Hi, > In WApplication *wApplicationCreate(WWindow *wwin) in application.c > the pointer to the wapp is saved using XSaveContext, > > XSaveContext(dpy, main_window, wAppWinContext, (XPointer)wapp); > > So if you free that resource the data associated with the window will > become a dangling pointer! Which will make valgrind throw up loads of > errors! > > When the life cycle of a window ends the wApplication is free'd through: > wApplicationDestroy(WApplication *wapp) in application.c > > Have a look in event.c in the function static void > handleDestroyNotify(XEvent *event) for an example of how a window / > application is free'd up.
Ah, I see now. Thanks for the explanation, I appreciated it. Perhaps that valgrind trace is there because it was during wmaker exit and valgrind had no time to notice it? If that is the case then the "leak" is not important anyway, so all is fine I guess :-) And seeing all the DEBUG printf()s in those paths, the people who coded this stuff was very careful so it is all well thought of. It turns out that excluding the traces with contain library stuff, there is almost nothing which is purely wmaker responsibility. Thanks again, it is always fun to learn these things. -- To unsubscribe, send mail to [email protected].
