mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
Fix memory leak warning (autorelease pool) on OSX. [Couriersud]
This commit is contained in:
parent
0fd2001a67
commit
2c2994aeb5
5
3rdparty/portmidi/pm_mac/osxsupport.m
vendored
5
3rdparty/portmidi/pm_mac/osxsupport.m
vendored
@ -20,12 +20,17 @@ static char *StringToChar(NSString *str)
|
||||
char *FindPrefsDir(void)
|
||||
{
|
||||
char *resstr = NULL;
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSPreferencePanesDirectory, NSUserDomainMask, YES);
|
||||
|
||||
if ([paths count] > 0)
|
||||
{
|
||||
resstr = StringToChar([paths objectAtIndex:0]) ;
|
||||
}
|
||||
|
||||
[pool release];
|
||||
|
||||
return resstr;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user