Cocoa : mem leak fix

This fixes the mem leak part of bug report #21186
This commit is contained in:
Damien Plisson 2010-02-16 16:38:29 +00:00
parent 2036a2638e
commit ed540dd1f1

@ -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;
}