Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2015-03-20 19:57:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-03-24 17:47:49 +0300
commitff455f1ae1ff5c309aca6b53fca361b48f3e81a1 (patch)
tree1fb642fd7b5ca253136a6819da98857b1ddb97a0
parent9bbb53ef688268124b3a5bf58c16111036c2b0a4 (diff)
Partly fix T44025, pixelFormat retain was left, for 2.74 backport
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 0b290c617a5..cf94dc83d18 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