Bug 750 - Leaked X11 ColorMap for each created X11 Window in NativeWindow (dummy) and NEWT
Summary: Leaked X11 ColorMap for each created X11 Window in NativeWindow (dummy) and NEWT
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: x11 (show other bugs)
Version: 2
Hardware: All all
: P4 minor
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-06-10 21:43 CEST by Sven Gothel
Modified: 2013-06-12 11:59 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
jogl aed9662552503b0a2fa67bcddbb7063b16d003d5
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-06-10 21:43:58 CEST
In both, Nativewindow and NEWT, we call:

xswa.colormap = XCreateColormap(dpy,
                                    windowParent,
                                    visual,
                                    AllocNone);

window = XCreateWindow(dpy,
                           windowParent,
                           0, 0, // only a hint, WM most likely will override
                           width, height,
                           0, // border width
                           depth,
                           InputOutput,
                           visual,
                           attrMask,
                           &xswa);

However, at destruction we do not destroy the colormap.

Fix is to call:

XDestroyWindow( display, win );  
XFreeColormap( display, xswa.colormap );