Autorelease `NSTrackingArea` to avoid leaking it

Antonio Scandurra created

Change summary

crates/gpui/src/platform/mac/window.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/gpui/src/platform/mac/window.rs 🔗

@@ -467,7 +467,7 @@ impl Window {
                 owner: native_view
                 userInfo: nil
             ];
-            let _: () = msg_send![native_view, addTrackingArea: tracking_area];
+            let _: () = msg_send![native_view, addTrackingArea: tracking_area.autorelease()];
 
             native_view.setAutoresizingMask_(NSViewWidthSizable | NSViewHeightSizable);
             native_view.setWantsBestResolutionOpenGLSurface_(YES);