Re: GdkPixbuf and basic memory management?



On Fri, Mar 24, 2006 at 12:32:59PM +0100, ?ystein Johansen wrote:
> I'm using GdkPixbuf to load a simple texture to use in OpenGL.
> 
> GError *pix_error = NULL;
> GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(file, &pix_error);
> 
> glBindTexture(blah, blah);  
> gluBuild2DMipmaps(blah, blah);
> 
> I'm now actually done with the image. How do I free it's memory? Do I have to free the memory? Should I use:
> 
>   g_object_unref(pixbuf);

This one.  See the documentation

http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-refcounting.html

(ignoring deprecated functions)

Yeti


--
That's enough.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]