Re: pixbuf leakage

"Walter C. Pelissero" <[email protected]> Sun, 4 May 2008 19:08:14 +0200
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
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.

-- 
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