diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.mm | 3 |
1 files changed, 3 insertions, 0 deletions
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 <qdebug.h> #include <QtCore/private/qcore_mac_p.h> #include <QtPlatformSupport/private/cglconvenience_p.h> @@ -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 <NSOpenGLPixelFormat *>(qcgl_createNSOpenGLPixelFormat()); NSOpenGLContext *actualShare = share ? static_cast<QCocoaGLContext *>(share)->m_context : 0; |