mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Equip any new threads with an NSAutoreleasePool.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6978 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -18,6 +18,10 @@
|
||||
#define USE_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
// WIN32
|
||||
|
||||
@ -256,9 +260,14 @@ private:
|
||||
template <typename F>
|
||||
static THREAD_RETURN RunAndDelete(void* param)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
#endif
|
||||
static_cast<F*>(param)->Run();
|
||||
delete static_cast<F*>(param);
|
||||
|
||||
#ifdef __APPLE__
|
||||
[pool release];
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user