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)
|
static void PerformRequest(void *info)
|
||||||
{
|
{
|
||||||
|
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||||
WineApplicationController* controller = [WineApplicationController sharedController];
|
WineApplicationController* controller = [WineApplicationController sharedController];
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
|
||||||
__block dispatch_block_t block;
|
__block dispatch_block_t block;
|
||||||
|
|
||||||
dispatch_sync(controller->requestsManipQueue, ^{
|
dispatch_sync(controller->requestsManipQueue, ^{
|
||||||
|
@ -2336,15 +2336,16 @@ static void PerformRequest(void *info)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!block)
|
if (!block)
|
||||||
{
|
|
||||||
[pool release];
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
block();
|
block();
|
||||||
[block release];
|
[block release];
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue