mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +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
|
@ -1379,6 +1379,8 @@ static ApplicationController* appCtrl;
|
|||
{
|
||||
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];
|
||||
|
@ -1568,6 +1574,8 @@ bool I_SetCursor(FTexture* cursorpic)
|
|||
|
||||
[appCtrl invalidateCursorRects];
|
||||
|
||||
[pool release];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue