mirror of https://github.com/axmolengine/axmol.git
UserDefault::setDataForKey on android will cause memory leak
This commit is contained in:
parent
87f94ee874
commit
29bd5001ae
|
@ -470,7 +470,7 @@ void UserDefault::setDataForKey(const char* pKey, const Data& value)
|
||||||
|
|
||||||
CCLOG("SET DATA ENCODED: --%s", encodedData);
|
CCLOG("SET DATA ENCODED: --%s", encodedData);
|
||||||
|
|
||||||
return setStringForKeyJNI(pKey, encodedData);
|
setStringForKeyJNI(pKey, encodedData);
|
||||||
|
|
||||||
if (encodedData)
|
if (encodedData)
|
||||||
free(encodedData);
|
free(encodedData);
|
||||||
|
|
Loading…
Reference in New Issue