Skip to content

Commit

Permalink
Fix double-freeing of windows
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 5, 2023
1 parent 50fc368 commit db7b3d8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/appkit/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit db7b3d8

Please sign in to comment.