diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2017-04-22 10:02:12 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2017-04-22 10:02:12 +1000 |
commit | 2bd1d204b9b539bc6cea8b69864c586e0e1b465c (patch) | |
tree | ce373ff85ea33f73615faffe4d1086b0093102e7 /cocoa/ScintillaView.mm | |
parent | b201e09daf251a0e3e5576b79643f6c4f841a4a9 (diff) | |
download | scintilla-mirror-2bd1d204b9b539bc6cea8b69864c586e0e1b465c.tar.gz |
Fix a leak of mouse tracking areas.
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r-- | cocoa/ScintillaView.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index f4c4f615f..1e85ab6e8 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -248,7 +248,10 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) - (void) updateTrackingAreas { if (trackingArea) + { [self removeTrackingArea:trackingArea]; + [trackingArea release]; + } int opts = (NSTrackingActiveAlways | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved); trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] @@ -1244,6 +1247,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context - (void) dealloc { [mCurrentCursor release]; + [trackingArea release]; [super dealloc]; } |