Skip to content

Commit

Permalink
NSViewComponentPeer: Fix NSTrackingArea leak
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Feb 7, 2022
1 parent eabcfba commit cdba8eb
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ static constexpr int translateVirtualToAsciiKeyCode (int keyCode) noexcept
| 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];

Expand Down

0 comments on commit cdba8eb

Please sign in to comment.