Skip to content

Commit

Permalink
Remove retain call instead on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
dathinaios committed Nov 17, 2024
1 parent b966fc9 commit ef23336
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/gl/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ impl GlContext {

view.setWantsBestResolutionOpenGLSurface_(YES);

let () = msg_send![view, retain];
NSOpenGLView::display_(view);
parent_view.addSubview_(view);

Expand Down
9 changes: 0 additions & 9 deletions src/macos/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@ impl WindowInner {
msg_send![class!(NSNotificationCenter), defaultCenter];
let () = msg_send![notification_center, removeObserver:self.ns_view];

// Ensure all subviews are detached and released
let subviews: id = msg_send![self.ns_view, subviews];
let count: usize = msg_send![subviews, count];
for i in 0..count {
let subview: id = msg_send![subviews, objectAtIndex: i];
subview.removeFromSuperview();
let () = msg_send![subview, release];
}

drop(window_state);

// Close the window if in non-parented mode
Expand Down

0 comments on commit ef23336

Please sign in to comment.