Merge pull request #180 from rust-windowing/fix-double-free
macOS: Fix double-free of `NSWindow`
This commit is contained in:
commit
ac92d531ed
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
|||
# Unreleased
|
||||
|
||||
- MacOS: Fix double-free of `NSWindow`.
|
||||
|
||||
# 0.4.0
|
||||
|
||||
- **Breaking:** Port to use `raw-window-handle` v0.6.(#132)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ impl<D: HasDisplayHandle, W: HasWindowHandle> CGImpl<D, W> {
|
|||
_ => return Err(InitError::Unsupported(window_src)),
|
||||
};
|
||||
let view = handle.ns_view.as_ptr() as id;
|
||||
let window = unsafe { msg_send![view, window] };
|
||||
let window: id = unsafe { msg_send![view, window] };
|
||||
let window: id = unsafe { msg_send![window, retain] };
|
||||
let layer = CALayer::new();
|
||||
unsafe {
|
||||
let subview: id = NSView::alloc(nil).initWithFrame_(NSView::frame(view));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue