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:
parent
9035e58e67
commit
bdbb3514bb
|
@ -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];
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue