Hang on releasing dynamic linked library due to no propper delegate cleanup
Original Reporter info from Mantis: accSone
-
Reporter name:
Original Reporter info from Mantis: accSone
- Reporter name:
Description:
My library is calling down to TCocoaWidgetSet.AppInit before opening a GUI to enable Hints, Popups etc. The new FNSApp_Delegate in cocoaobject.inc, line 39
{ Creates the application NSApp object }
FNSApp := NSApplication.sharedApplication;
FNSApp_Delegate := TAppDelegate.alloc.init;
FNSApp.setDelegate(FNSApp_Delegate);
is not proper cleaned up in finalization. Therefore the lib caller host will crash after releasing the library.
Workaround by commenting out the two following lines (works for me as I don't need the functionality (e.g DragnDrop?)
//FNSApp_Delegate := TAppDelegate.alloc.init;
//FNSApp.setDelegate(FNSApp_Delegate)
Mantis conversion info:
- Mantis ID: 31262
- OS: OSX
- OS Build: 10.11.6
- Build: Revision 53966
- Platform: darwin x86_64
- Version: 1.8