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:
authorDamien Plisson <damien.plisson@yahoo.fr>2010-02-16 19:38:29 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2010-02-16 19:38:29 +0300
commited540dd1f17eb4e8e81068509ffc93933a548aef (patch)
treedbe7bcbb1d6b0682e4cca6e344c40f61d93ffd23
parent2036a2638e3abf0d4cd3e494ede0babf0b8febbf (diff)
Cocoa : mem leak fix
This fixes the mem leak part of bug report #21186
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index f9ba8f6e9b9..0b10a02849f 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -854,6 +854,8 @@ GHOST_TSuccess GHOST_WindowCocoa::setModifiedState(bool isUnsavedChanges)
GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setOrder(): window invalid")
if (order == GHOST_kWindowOrderTop) {
[m_window makeKeyAndOrderFront:nil];
@@ -869,6 +871,8 @@ GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
[[windowsList objectAtIndex:0] makeKeyAndOrderFront:nil];
}
}
+
+ [pool drain];
return GHOST_kSuccess;
}