From db7b3d8f6ed809a336f64c92bda26ab76aef4b93 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 5 Sep 2023 14:31:34 +0200 Subject: [PATCH] Fix double-freeing of windows --- src/appkit/window/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/appkit/window/mod.rs b/src/appkit/window/mod.rs index 17fa2c64..c479c79b 100644 --- a/src/appkit/window/mod.rs +++ b/src/appkit/window/mod.rs @@ -87,8 +87,6 @@ impl Window { }, ]; - let _: () = msg_send![&*window, autorelease]; - // This is very important! NSWindow is an old class and has some behavior that we need // to disable, like... this. If we don't set this, we'll segfault entirely because the // Objective-C runtime gets out of sync by releasing the window out from underneath of @@ -157,8 +155,6 @@ where let delegate_ptr: *const T = &*delegate; window.set_ivar(WINDOW_DELEGATE_PTR, delegate_ptr as usize); - let _: () = msg_send![&*window, autorelease]; - // This is very important! NSWindow is an old class and has some behavior that we need // to disable, like... this. If we don't set this, we'll segfault entirely because the // Objective-C runtime gets out of sync by releasing the window out from underneath of