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:12:43 -0500
> >gdk_pixmap_create_from_xpm and simply ends without doing something
> >usefull.
> >
> >Everything is ok. But when the program ends my X server takes a big
> >part of my memory
> >
> > 2613 root 0 0 35116 8012 2812 S 0 1.1 25.6 10:20 X
> >
> >I think that there is some problem in gdk. Before running my program X
> >takes about 8megs... Sorry, but I do not have time to debug it
> >completely, but I can provide more info on request.
>
> 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.
gdk_pixmap_unref() is the call one uses to indicate that
your program is no longer interested in a pixmap.
But, when your program exits, X will automatically release
any pixmaps that it is using (1). This isn't Windows.
The reason that the X server remains large is that
generally under Unix, programs will not get smaller,
but simply keep the free memory in reserve for later
use.
Owen
(1) Unless the pixmap is set as the background for the
root window, and other such special cases.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]