Partly fix T44025, pixelFormat retain was left, for 2.74 backport
This commit is contained in:
parent
919a665497
commit
0582aa6f13
Notes:
blender-bot
2023-02-14 11:08:33 +01:00
Referenced by issue #44078, Little to no pressure sensitivity on tablet while drawing vertically Referenced by issue #44025, OpenGL memory leaks when using Save User Settings.
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue