winemac: Use a more idiomatic pattern for an autorelease pool around a loop.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2016-06-03 00:06:48 -05:00 committed by Alexandre Julliard
parent 9035e58e67
commit bdbb3514bb
1 changed files with 5 additions and 4 deletions

View File

@ -2318,11 +2318,11 @@ - (void)applicationWillResignActive:(NSNotification *)notification
*/
static void PerformRequest(void *info)
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
WineApplicationController* controller = [WineApplicationController sharedController];
for (;;)
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
__block dispatch_block_t block;
dispatch_sync(controller->requestsManipQueue, ^{
@ -2336,15 +2336,16 @@ static void PerformRequest(void *info)
});
if (!block)
{
[pool release];
break;
}
block();
[block release];
[pool release];
pool = [[NSAutoreleasePool alloc] init];
}
[pool release];
}
/***********************************************************************