void () { // exec at EDT if (myIsDisposed) { return; } myIsDisposed = true; if (windowHandle != null) { _trace("scheduled destroying of GlobalMenuLinux for frame %s | xid=0x%X", frame, xid); ourLib.releaseWindowOnMainLoop(windowHandle, onWindowReleased); } else { _trace("scheduled destroying of unused GlobalMenuLinux for frame %s | xid=0x%X", frame, xid); ourLib.execOnMainLoop(onWindowReleased); } }