On Wed 18 Jun 2014 at 20:48:58 +0200, Rhialto wrote:
> While working on icon support in the ewmh branch I came across what I
> think is a memory leak with icons that change depending on a window's
> title.

(while looking what I have to clean up from the iconslist)

Please tell me that I'm paranoid, but now that I'm looking for the
deallocation of a normal, plain icon's Pixmap, I can't find it!

I would expect HandleDestroyNotify() in events.c to do it, somewhere
around where it checks for Tmp_win->icon. I'd expect to see a call to
FreeImage() or some XFreePixmap() calls for at least some cases.

Since Pixmaps use server-side resources and have an XID value, it is
kind of important that they get freed. Is there some tool to check what
Pixmap IDs there are? xwininfo -root -tree shows only windows.

On the assumption that this cleanup is indeed missing, I'm adding
deallocation code for that, and I'm running ctwm under Valgrind for a
bit, to check if I accidentally free too much. So far, no alarm.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

Attachment: pgpY0ZCAoMoGn.pgp
Description: PGP signature

Reply via email to