[Bf-blender-cvs] [ff455f1] blender-v2.74-release: Partly fix T44025, pixelFormat retain was left, for 2.74 backport
Jens Verwiebe
noreply at git.blender.org
Tue Mar 24 15:59:40 CET 2015
Commit: ff455f1ae1ff5c309aca6b53fca361b48f3e81a1
Author: Jens Verwiebe
Date: Fri Mar 20 17:57:35 2015 +0100
Branches: blender-v2.74-release
https://developer.blender.org/rBff455f1ae1ff5c309aca6b53fca361b48f3e81a1
Partly fix T44025, pixelFormat retain was left, for 2.74 backport
===================================================================
M intern/ghost/intern/GHOST_ContextCGL.mm
===================================================================
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 0b290c6..cf94dc8 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -292,14 +292,16 @@ GHOST_TSuccess GHOST_ContextCGL::initializeDrawingContext()
[m_openGLView setPixelFormat:pixelFormat];
- m_openGLContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:s_sharedOpenGLContext];
+ m_openGLContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:s_sharedOpenGLContext]; // +1 refCount to pixelFormat
if (m_openGLContext == nil)
goto error;
if (s_sharedCount == 0)
s_sharedOpenGLContext = m_openGLContext;
-
+
+ [pixelFormat release]; // -1 refCount to pixelFormat
+
s_sharedCount++;
#ifdef GHOST_MULTITHREADED_OPENGL
More information about the Bf-blender-cvs
mailing list