Cocoa: remove autoreleasepool in QCocoaIntegration
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Thu, 8 Dec 2011 09:54:49 +0000 (10:54 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 8 Dec 2011 11:46:08 +0000 (12:46 +0100)
This one was far to long lived and would delay
releases until application shutdown.

We might get more "no autoreleasepool in place"
warnings now, these should be fixed by adding local
auto release pools.

Change-Id: Ia7a46ab05fb1937154997d0c47b8899d2a0cef65
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
src/plugins/platforms/cocoa/qcocoaintegration.h
src/plugins/platforms/cocoa/qcocoaintegration.mm

index 5311eaf..1852173 100644 (file)
@@ -93,7 +93,6 @@ private:
     QPlatformFontDatabase *mFontDb;
     QAbstractEventDispatcher *mEventDispatcher;
 
-    QCocoaAutoReleasePool *mPool;
     QPlatformAccessibility *mAccessibility;
     QPlatformTheme *mPlatformTheme;
 };
index 445f67f..6d7770f 100644 (file)
@@ -90,8 +90,6 @@ QCocoaIntegration::QCocoaIntegration()
     : mFontDb(new QCoreTextFontDatabase())
     , mEventDispatcher(new QCocoaEventDispatcher())
 {
-    mPool = new QCocoaAutoReleasePool;
-
     qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);
 
     NSApplication *cocoaApplication = [NSApplication sharedApplication];
@@ -141,7 +139,6 @@ QCocoaIntegration::QCocoaIntegration()
 QCocoaIntegration::~QCocoaIntegration()
 {
     delete mAccessibility;
-    delete mPool;
 }
 
 bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) const