Autorelease NSTrackingArea to avoid leaking it

This commit is contained in:
Antonio Scandurra 2022-09-15 16:24:02 +02:00
parent cc316423ca
commit 3ec3f838db

View file

@ -467,7 +467,7 @@ impl Window {
owner: native_view owner: native_view
userInfo: nil 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.setAutoresizingMask_(NSViewWidthSizable | NSViewHeightSizable);
native_view.setWantsBestResolutionOpenGLSurface_(YES); native_view.setWantsBestResolutionOpenGLSurface_(YES);