Re: pixbuf leakage

"Walter C. Pelissero" <[email protected]> Mon, 5 May 2008 09:02:11 +0200
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
Walter C. Pelissero writes:
 > Espen S Johnsen writes:
 >  > "Walter C. Pelissero" <[email protected]> writes:
 >  > 
 >  > > The following code will leak memory but I couldn't quite find the
 >  > > hole.  The larger the loaded pixbuf/image the faster.
 >  > 
 >  > I suspect this to be a memory leak in the library code for Pixbuf
 >  > or Gtk+, as the included C translation of your test code give the
 >  > exact same result. Someone with time to spare should definitely
 >  > look more closely into this...
 > 
 > I believe your example was missing an unref:
 > 
 >       fclose (stream);
 >       gdk_pixbuf_loader_close (loader, NULL);
 > +     g_object_unref(loader);
 >     }
 > }
 > 
 > With that in, no memory leak is reported by the profiling functions,
 > although the process does get quite big nevertheless.

Not exactly.  The process gets big only using the profiling functions.
(I suppose they may not really free the memory for post-mortem
analysis or something like that.)

-- 
walter pelissero
http://www.pelissero.de

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone