From 1a218a7ee1c031f16690941ef859885534b3483d Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Thu, 8 Dec 2011 10:54:49 +0100 Subject: [PATCH] Cocoa: remove autoreleasepool in QCocoaIntegration 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 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/cocoa/qcocoaintegration.h | 1 - src/plugins/platforms/cocoa/qcocoaintegration.mm | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index 5311eaff83..1852173b5b 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -93,7 +93,6 @@ private: QPlatformFontDatabase *mFontDb; QAbstractEventDispatcher *mEventDispatcher; - QCocoaAutoReleasePool *mPool; QPlatformAccessibility *mAccessibility; QPlatformTheme *mPlatformTheme; }; diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 445f67f1e7..6d7770fecc 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -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