Re: Memory Leak when using GnomeDialog


OK, the memory growth that persists after turning off the imlib cache
persists because imlib is still caching some things even with it off.

Apparently only the image cache can be disabled; there's a setting for
disabling the pixmap cache but it's only used to check whether to look
in the pixmap cache, not to decide whether to store stuff there.  Of
course (this being Imlib) the image-cache-disabling was implemented
via cut-and-paste and so it could be broken in specific cases. Miguel
and Federico actually understand what's going on with Imlib here I

It looks to me like the fix is to have _gdk_imlib_add_pixmap in
imlib/gdk_imlib/cache.c check whether the pixmap cache is disabled. 
Then we have to make an imlib release (joy).

Memory usage is substantially decreased by changing copy_image and
copy_mask calls in gnome-pixmap.c:finish_load to move_image and
move_mask, I think because this has the bizarre side effect of not
caching those images (but "blank" unrendered images are still cached
using about 15K for 100 dialogs...)

I'm going to apply the move_image move_mask patch to stable and HEAD
since it seems more sensible anyway, and wait for input from others on
the cache disabling.

Sorry about this, I thought it had been at least
semi-worked-around. Rest assured that gdk-pixbuf in the next version
of GNOME doesn't have the problem.


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