Fixed conflict with autorelease pools when using SFML in a Cocoa app.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1422 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
ceylo 2010-02-23 10:15:24 +00:00
parent 2ee1c5751a
commit 9354d3adba

View File

@ -380,14 +380,14 @@
myOwningEventLoop = YES; myOwningEventLoop = YES;
} }
// Clean the autorelease pool
[myMainPool release];
myMainPool = [[NSAutoreleasePool alloc] init];
NSEvent *event = nil; NSEvent *event = nil;
if (myOwningEventLoop) if (myOwningEventLoop)
{ {
// Clean the autorelease pool
[myMainPool release];
myMainPool = [[NSAutoreleasePool alloc] init];
// Minimal event loop // Minimal event loop
while (nil != (event = [NSApp nextEventMatchingMask:NSAnyEventMask while (nil != (event = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:nil untilDate:nil