Bug 750

Summary: Leaked X11 ColorMap for each created X11 Window in NativeWindow (dummy) and NEWT
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: x11Assignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P4    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
jogl aed9662552503b0a2fa67bcddbb7063b16d003d5
Workaround: ---

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 );