mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Added auto-release pools to decrease memory fragmentation on older OS X like 10.5 or 10.6
This commit is contained in:
parent
70bb80e2bf
commit
660ebf2c6c
1 changed files with 10 additions and 2 deletions
|
@ -1378,7 +1378,9 @@ static ApplicationController* appCtrl;
|
|||
- (void)processEvents:(NSTimer*)timer
|
||||
{
|
||||
ZD_UNUSED(timer);
|
||||
|
||||
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
while (true)
|
||||
{
|
||||
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
|
@ -1435,6 +1437,8 @@ static ApplicationController* appCtrl;
|
|||
}
|
||||
|
||||
[NSApp updateWindows];
|
||||
|
||||
[pool release];
|
||||
}
|
||||
|
||||
|
||||
|
@ -1513,6 +1517,8 @@ void I_SetMainWindowVisible(bool visible)
|
|||
|
||||
bool I_SetCursor(FTexture* cursorpic)
|
||||
{
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
if (NULL == cursorpic || FTexture::TEX_Null == cursorpic->UseType)
|
||||
{
|
||||
s_cursor = [NSCursor arrowCursor];
|
||||
|
@ -1567,7 +1573,9 @@ bool I_SetCursor(FTexture* cursorpic)
|
|||
}
|
||||
|
||||
[appCtrl invalidateCursorRects];
|
||||
|
||||
|
||||
[pool release];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue