diff options
author | Tim Blechmann <tim@klingt.org> | 2014-12-13 20:21:38 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-06-04 07:56:48 +0000 |
commit | 536c5df13f20ef7fe838f2f60cbaf075f8dc212e (patch) | |
tree | e890b06370735b02bbb722c4a721a74df674e4ee /src/plugins/platforms/cocoa | |
parent | 015bc9d7ce91ab2dfe361286317da8e062536846 (diff) |
Cocoa: QCocoaApplicationDelegate - correctly install cleanup handler
+ (id)allocWithZone:(NSZone *)zone returns before the cleanup handler is
installed. this causes the QCocoaApplicationDelegate not to be cleaned up
by the garbage collector
Change-Id: Ic4862b96228539f3da857955f08157402974a104
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index f3a0216870..6c673a4f5d 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -131,8 +131,8 @@ QT_END_NAMESPACE @synchronized(self) { if (sharedCocoaApplicationDelegate == nil) { sharedCocoaApplicationDelegate = [super allocWithZone:zone]; - return sharedCocoaApplicationDelegate; qAddPostRoutine(cleanupCocoaApplicationDelegate); + return sharedCocoaApplicationDelegate; } } return nil; |