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 <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
#include "qcocoaglcontext.h"
#include "qcocoawindow.h"
+#include "qcocoaautoreleasepool.h"
#include <qdebug.h>
#include <QtCore/private/qcore_mac_p.h>
#include <QtPlatformSupport/private/cglconvenience_p.h>
QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformGLContext *share)
: m_format(format)
{
+ QCocoaAutoReleasePool pool; // For the SG Canvas render thread.
+
NSOpenGLPixelFormat *pixelFormat = static_cast <NSOpenGLPixelFormat *>(qcgl_createNSOpenGLPixelFormat());
NSOpenGLContext *actualShare = share ? static_cast<QCocoaGLContext *>(share)->m_context : 0;