[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: How to convert a jpg image to a GtkImage ?
From:       David =?iso-8859-2?B?TmXoYXMgKFlldGkp?= <yeti () physics ! muni ! cz>
Date:       2007-09-09 10:39:13
Message-ID: 20070909103912.GQ421 () potato ! chello ! upc ! cz
[Download RAW message or body]

On Sun, Sep 09, 2007 at 06:30:02PM +0800, Gregory Hosler wrote:
> 
> This works fine, but now I have a concern as regards to memory leak.
> ...
> 
> The reason for new'ing a new loader each time is that, from the documentation,
> it appears that once I "loader_close()", I can no longer write to the loader,
> and it is not clear that I can do sequential loader writes's followed by
> loader_get_pixbuf's, thereby reusing the same (original) loader.
> 
> I also am not seeing a convenient way to destroy the loader. (it does happen to
> have a finalize routine, but I'm not sure how to invoke it :)

GdkPixbufLoader is a GObject, you get rid of it as of
anything else: by releasing the last reference with
g_object_unref().

> 	reusing the loader (if possible).

This is not possible (the loader is tied to its pixbuf).

Yeti

--
http://gwyddion.net/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic