mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 14:09:06 +00:00
OS X: Fix a memory overrelease.
CoreFoundation functions that have "Get" in their names usually don't need to be released.
This commit is contained in:
parent
6b82ea86be
commit
bc260fa581
1 changed files with 0 additions and 3 deletions
|
@ -7,7 +7,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_MACOSX
|
#ifdef BBGE_BUILD_MACOSX
|
||||||
#include <Carbon/Carbon.h>
|
|
||||||
#include <CoreFoundation/CFLocale.h>
|
#include <CoreFoundation/CFLocale.h>
|
||||||
#include <CoreFoundation/CFString.h>
|
#include <CoreFoundation/CFString.h>
|
||||||
|
|
||||||
|
@ -112,13 +111,11 @@ std::string getSystemLocale()
|
||||||
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleLanguageCode)) != NULL)
|
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleLanguageCode)) != NULL)
|
||||||
{
|
{
|
||||||
localeStr = _CFToStdString(buf);
|
localeStr = _CFToStdString(buf);
|
||||||
CFRelease(buf);
|
|
||||||
|
|
||||||
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleCountryCode)) != NULL)
|
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleCountryCode)) != NULL)
|
||||||
{
|
{
|
||||||
localeStr += "_";
|
localeStr += "_";
|
||||||
localeStr += _CFToStdString(buf);
|
localeStr += _CFToStdString(buf);
|
||||||
CFRelease(buf);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue