Cocoa: Add autorelease pools.
authorMorten Johan Sørvig <morten.sorvig@nokia.com>
Mon, 12 Dec 2011 08:52:40 +0000 (09:52 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Dec 2011 16:27:19 +0000 (17:27 +0100)
commit82b73ab03a7f2f519ad8efd176a8f3be7a9b9f5b
treef7a1f0c78dc02e53aa49027fbefb0288b171fb77
parent6802e3165ea0d7c7bb5b4249ef1bb82f85febf86
Cocoa: Add autorelease pools.

A couple of cases where we call Cococa APIs without
having an autorelease pool in place surfaced after
removing the global autorelease pool in 1a218a7.
(This happens when when Qt API is called before
app.exec() has started the Cocoa event loop.)

Add local autorelease pools to prevent memory leaks.

Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
src/plugins/platforms/cocoa/qcocoabackingstore.mm
src/plugins/platforms/cocoa/qcocoaintegration.mm
src/plugins/platforms/cocoa/qcocoawindow.mm