Browse Source

NSViewComponentPeer: Fix NSTrackingArea leak

v6.1.6
reuk 3 years ago
parent
commit
cdba8eb8e9
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm

+ 5
- 4
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm 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];


Loading…
Cancel
Save