Properly release pixel format and context in QCocoaGLContext.
Change-Id: Idd13924dccc8d7798f463484eeb3c3074f7b51f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
5e61bbe586
commit
f1cc2aaea9
@ -56,6 +56,7 @@ class QCocoaGLContext : public QPlatformOpenGLContext
|
||||
{
|
||||
public:
|
||||
QCocoaGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share);
|
||||
~QCocoaGLContext();
|
||||
|
||||
QSurfaceFormat format() const;
|
||||
|
||||
|
@ -65,11 +65,18 @@ QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformOpenGLCo
|
||||
[m_context initWithFormat:pixelFormat shareContext:nil];
|
||||
}
|
||||
|
||||
[pixelFormat release];
|
||||
|
||||
const GLint interval = 1;
|
||||
[m_context setValues:&interval forParameter:NSOpenGLCPSwapInterval];
|
||||
|
||||
}
|
||||
|
||||
QCocoaGLContext::~QCocoaGLContext()
|
||||
{
|
||||
[m_context release];
|
||||
}
|
||||
|
||||
// Match up with createNSOpenGLPixelFormat!
|
||||
QSurfaceFormat QCocoaGLContext::format() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user