Re: [gtk-list] Re: gdk_pixmap_create_from_xpm's and X memory




Pavel.Janik@inet.cz (Pavel Janik ml.) writes:

>    From: James Bailie <jbailie@wwdc.com>
>    Date: Thu, 28 Jan 1999 16:45:36 -0500
> 
> Hi,
> 
>    > The space for pixmaps is allocated by the X server, and is not deallocated
>    > when your program exits. You have to tell the X server to destroy the
>    > pixmap. It's a form of caching. You need to explicitly call
>    > gdk_pixmap_destroy, I believe, for every pixmap you created.
> 
> ok, I have looked at sources and here is what I should probably do:
> 
> 	1. gdk_pixmap_new
> 	2. gdk_pixmap_ref
> 	3. ....
> 	4. gdk_pixmap_unref at the end of my program for every
> 	   allocated pixmap

See my other reply for why this isn't necessary at all. 
But, for the reference counting, note that every pixmap is
created with a reference count of 1, so step 2 is
not needed.
                                        Owen



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