Skip to content

Commit 3829510

Browse files
dathinaiosmicahrj
andauthored
Fix memory leak when GUI window is closed (#198)
* Fix memory leak for Win & Mac * Remove retain call instead on Mac * Comment out PostMessage * Reverse Windows changes --------- Co-authored-by: Micah Johnston <[email protected]>
1 parent 3e12973 commit 3829510

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

src/gl/macos.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ impl GlContext {
9595

9696
view.setWantsBestResolutionOpenGLSurface_(YES);
9797

98-
let () = msg_send![view, retain];
9998
NSOpenGLView::display_(view);
10099
parent_view.addSubview_(view);
101100

src/macos/window.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ impl WindowInner {
7272
pub(super) fn close(&self) {
7373
if self.open.get() {
7474
self.open.set(false);
75-
7675
unsafe {
7776
// Take back ownership of the NSView's Rc<WindowState>
7877
let state_ptr: *const c_void = *(*self.ns_view).get_ivar(BASEVIEW_STATE_IVAR);

0 commit comments

Comments
 (0)