mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Release NS objects (bug#79023)
* src/nsterm.m (ns_free_frame_resources): Release the NSView. ([EmacsView dealloc]): Release the EmacsLayer and menu. ([EmacsWindow dealloc]): Fix the toolbar release. Co-authored-by: Rudolf Adamkovič <rudolf@adamkovic.org>
This commit is contained in:
parent
ba8752cae9
commit
7de5a6d1f7
1 changed files with 11 additions and 1 deletions
12
src/nsterm.m
12
src/nsterm.m
|
|
@ -1637,6 +1637,7 @@ Hide the window (X11 semantics)
|
|||
|
||||
[[view window] close];
|
||||
[view removeFromSuperview];
|
||||
[view release];
|
||||
|
||||
xfree (f->output_data.ns);
|
||||
f->output_data.ns = NULL;
|
||||
|
|
@ -6844,6 +6845,14 @@ - (void)dealloc
|
|||
|
||||
if (fs_state == FULLSCREEN_BOTH)
|
||||
[nonfs_window release];
|
||||
|
||||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
||||
/* Release layer and menu */
|
||||
EmacsLayer *layer = (EmacsLayer *)[self layer];
|
||||
[layer release];
|
||||
#endif
|
||||
|
||||
[[self menu] release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
@ -9599,8 +9608,9 @@ - (void)dealloc
|
|||
NSTRACE ("[EmacsWindow dealloc]");
|
||||
|
||||
/* We need to release the toolbar ourselves. */
|
||||
[self setToolbar: nil];
|
||||
[[self toolbar] release];
|
||||
[self setToolbar: nil];
|
||||
|
||||
|
||||
/* Also the last button press event . */
|
||||
if (last_drag_event)
|
||||
|
|
|
|||
Loading…
Reference in a new issue