forked from bartvdbraak/blender
Fix OS X memory leak prints when starting blender:
"__NSAutoreleaseNoPool() ... autoreleased with no pool in place - just leaking"
This commit is contained in:
parent
39113a3582
commit
b19521f2b2
@ -783,9 +783,9 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
|
|||||||
break;
|
break;
|
||||||
case GHOST_kWindowStateNormal:
|
case GHOST_kWindowStateNormal:
|
||||||
default:
|
default:
|
||||||
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
if (m_fullScreen)
|
if (m_fullScreen)
|
||||||
{
|
{
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
||||||
m_fullScreen = false;
|
m_fullScreen = false;
|
||||||
|
|
||||||
//Exit fullscreen
|
//Exit fullscreen
|
||||||
@ -835,15 +835,15 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
|
|||||||
|
|
||||||
//Tell WM of view new size
|
//Tell WM of view new size
|
||||||
m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
|
m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
|
||||||
|
|
||||||
[pool drain];
|
|
||||||
}
|
}
|
||||||
else if ([m_window isMiniaturized])
|
else if ([m_window isMiniaturized])
|
||||||
[m_window deminiaturize:nil];
|
[m_window deminiaturize:nil];
|
||||||
else if ([m_window isZoomed])
|
else if ([m_window isZoomed])
|
||||||
[m_window zoom:nil];
|
[m_window zoom:nil];
|
||||||
|
[pool drain];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GHOST_kSuccess;
|
return GHOST_kSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user