nanogui: XCreateWindow/XDestroyWindow memory leak?


Previous by date: 14 Nov 2007 05:58:50 +0000 save image, pushparaj muthu
Next by date: 14 Nov 2007 05:58:50 +0000 Re: save image, Carlo Zinato
Previous in thread: 14 Nov 2007 05:58:50 +0000 Re: XCreateWindow/XDestroyWindow memory leak?, Greg Haerr
Next in thread: 14 Nov 2007 05:58:50 +0000 Re: XCreateWindow/XDestroyWindow memory leak?, Martin Kajdas

Subject: Re: [nanogui] XCreateWindow/XDestroyWindow memory leak?
From: "Greg Haerr" ####@####.####
Date: 14 Nov 2007 05:58:50 +0000
Message-Id: <047a01c82683$67017860$6401a8c0@winXP>

- inside nxlib's XChangeProperty(), I print Atom and XGetAtomName(...) 
string
- some printed XGetAtomName are NULL but the Atom value is always positive

Sounds like there's already a bug right here...  Put some printfs inside
XInternAtom, which show the input atom_name and the assigned
Atom number on exit, both when the atom previously exists and
when it is created.  In addition, print out XGetAtomName in
XInternAtom as well, since there should never be XGetAtomName
NULL when nothing has even been deleted yet.


- inside nxlib's _nxDelAllProperty(), I again print Atom and 
XGetAtomName(...) string to see what gets deleted
- when XDestroyWindow is called, the _nxDelAllProperty deletes all 
properties that have Atom and non-NULL XGetAtomName and ONLY the first of 
properties that has correct Atom and NULL XGetAtomName

I looked at the code and can't see the problem yet, but the above
should show us where the atom creation is failing.


> I do not know how the Atom number specifies XGetAtomName.

There's just a linked list from a hash table in Atom.c, and XGetAtomName
for-loops through the list looking for an Atom match.

Regards,

Greg



Previous by date: 14 Nov 2007 05:58:50 +0000 save image, pushparaj muthu
Next by date: 14 Nov 2007 05:58:50 +0000 Re: save image, Carlo Zinato
Previous in thread: 14 Nov 2007 05:58:50 +0000 Re: XCreateWindow/XDestroyWindow memory leak?, Greg Haerr
Next in thread: 14 Nov 2007 05:58:50 +0000 Re: XCreateWindow/XDestroyWindow memory leak?, Martin Kajdas


Powered by ezmlm-browse 0.20.