Release NSView object on Display.destroy()

This commit is contained in:
kappaOne 2013-01-31 23:47:50 +00:00
parent b27754089a
commit 549f07fd28

View file

@ -565,10 +565,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nDestroyWindow(JNIEnv
if ([window_info->window contentView] == window_info->view) {
[window_info->window close];
}
else {
// the nsview has a parent, remove it from there
[window_info->view removeFromSuperviewWithoutNeedingDisplay];
}
// release the nsview and remove it from any parent nsview
[window_info->view removeFromSuperviewWithoutNeedingDisplay];
}
}