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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-16 23:42:51 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-16 23:42:51 +0400
commitb19521f2b21266ca4e1c22774c5b9528bc2624d0 (patch)
tree75a163b46f56a2afff67c77565cf1926a6bb547f /intern
parent39113a35823754c225abeb485459ba487f1f07a1 (diff)
Fix OS X memory leak prints when starting blender:
"__NSAutoreleaseNoPool() ... autoreleased with no pool in place - just leaking"
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index a97f7621bb0..83f86840eb4 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -783,9 +783,9 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
break;
case GHOST_kWindowStateNormal:
default:
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if (m_fullScreen)
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
m_fullScreen = false;
//Exit fullscreen
@@ -835,15 +835,15 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
//Tell WM of view new size
m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
-
- [pool drain];
}
else if ([m_window isMiniaturized])
[m_window deminiaturize:nil];
else if ([m_window isZoomed])
[m_window zoom:nil];
+ [pool drain];
break;
}
+
return GHOST_kSuccess;
}