By default NSWindow's release themselves when closed, which doesn't interact well with rust's lifetime system. Disable that behaviour, and explicitly release the NSWindow when the window handle is dropped. Release Notes: - Fixed a (rare) panic when closing a window.