1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

NSViewComponentPeer: Fix NSTrackingArea leak

This commit is contained in:
reuk 2022-02-04 16:33:05 +00:00
parent eabcfbad26
commit cdba8eb8e9

View file

@ -126,10 +126,11 @@ public:
| NSTrackingEnabledDuringMouseDrag
| NSTrackingActiveAlways
| NSTrackingInVisibleRect;
[view addTrackingArea: [[NSTrackingArea alloc] initWithRect: r
options: options
owner: view
userInfo: nil]];
const NSUniquePtr<NSTrackingArea> trackingArea { [[NSTrackingArea alloc] initWithRect: r
options: options
owner: view
userInfo: nil] };
[view addTrackingArea: trackingArea.get()];
notificationCenter = [NSNotificationCenter defaultCenter];