Re: [gtk-list] Re: gdk_pixmap_create_from_xpm's and X memory
- From: Owen Taylor <otaylor redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gdk_pixmap_create_from_xpm's and X memory
- Date: Sat, 30 Jan 1999 14:14:49 -0500
Pavel.Janik@inet.cz (Pavel Janik ml.) writes:
> From: James Bailie <firstname.lastname@example.org>
> Date: Thu, 28 Jan 1999 16:45:36 -0500
> > 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
] [Thread Prev