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



In message <m34spb4t74.fsf@SnowWhite.inet.cz>, Pavel Janik ml. writes:

>I have made some small program which uses about 500 times
>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.


--
James Bailie

http://www.wwdc.com/~jbailie



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