diff --git a/src/gl/macos.rs b/src/gl/macos.rs index 05f2aa2..323a40d 100644 --- a/src/gl/macos.rs +++ b/src/gl/macos.rs @@ -91,7 +91,6 @@ impl GlContext { view.setWantsBestResolutionOpenGLSurface_(YES); - let () = msg_send![view, retain]; NSOpenGLView::display_(view); parent_view.addSubview_(view); diff --git a/src/macos/window.rs b/src/macos/window.rs index 8a509a5..6bdd2be 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -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