mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
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:
parent
2ee1c5751a
commit
9354d3adba
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user