From 6fce65f87129e7f9a02b1dcba73e8cef66c8bbbc Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Fri, 12 Aug 2011 13:39:23 +0200 Subject: Cocoa: Remove autorelease warnings from qmlscene. The SG Canvas render thread was creating a QCocoaGLContext without an autorelease pool in place. Change-Id: I08882f42efdf905107497e8be21f2a2d20c3c4cf Reviewed-on: http://codereview.qt.nokia.com/2911 Reviewed-by: Qt Sanity Bot Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/cocoa/qcocoaglcontext.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index c3ff18f980..e10a50b7c0 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -1,5 +1,6 @@ #include "qcocoaglcontext.h" #include "qcocoawindow.h" +#include "qcocoaautoreleasepool.h" #include #include #include @@ -9,6 +10,8 @@ QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformGLContext *share) : m_format(format) { + QCocoaAutoReleasePool pool; // For the SG Canvas render thread. + NSOpenGLPixelFormat *pixelFormat = static_cast (qcgl_createNSOpenGLPixelFormat()); NSOpenGLContext *actualShare = share ? static_cast(share)->m_context : 0; -- cgit v1.2.3