mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2420 from minggo/2073-userdefault_memory_leak_
fixed #2073: fix memory leak in CCUserDefault
This commit is contained in:
commit
ec43617469
|
@ -66,6 +66,7 @@ static tinyxml2::XMLElement* getXMLNodeForKey(const char* pKey, tinyxml2::XMLEle
|
|||
break;
|
||||
}
|
||||
xmlDoc->Parse(pXmlBuffer);
|
||||
delete[] pXmlBuffer;
|
||||
// get root node
|
||||
*rootNode = xmlDoc->RootElement();
|
||||
if (NULL == *rootNode)
|
||||
|
|
|
@ -81,6 +81,7 @@ static tinyxml2::XMLElement* getXMLNodeForKey(const char* pKey, tinyxml2::XMLDoc
|
|||
break;
|
||||
}
|
||||
xmlDoc->Parse(pXmlBuffer);
|
||||
delete[] pXmlBuffer;
|
||||
// get root node
|
||||
rootNode = xmlDoc->RootElement();
|
||||
if (NULL == rootNode)
|
||||
|
|
|
@ -82,6 +82,7 @@ static tinyxml2::XMLElement* getXMLNodeForKey(const char* pKey, tinyxml2::XMLDoc
|
|||
break;
|
||||
}
|
||||
xmlDoc->Parse(pXmlBuffer);
|
||||
delete[] pXmlBuffer;
|
||||
// get root node
|
||||
rootNode = xmlDoc->RootElement();
|
||||
if (NULL == rootNode)
|
||||
|
|
Loading…
Reference in New Issue