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