Add autorelease pool for cocoa plugin creation.

Prevents mem leaks at startup on 10.6.

Change-Id: I5f8b72c54ab396ee0ec2e47320163a6a342b78f1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Morten Johan Sorvig 2013-04-15 12:39:18 +02:00 committed by The Qt Project
parent 6a0bb4206a
commit 27d40fce12

View File

@ -59,6 +59,9 @@ public:
QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
QCocoaAutoReleasePool pool;
if (system.toLower() == "cocoa")
return new QCocoaIntegration;