Fixed: Release libxml2 structures before exit
This commit is contained in:
parent
ab047793cf
commit
0da495081a
3 changed files with 11 additions and 2 deletions
|
@ -171,6 +171,11 @@ public:
|
|||
*/
|
||||
static bool getContentString (std::string &result, xmlNodePtr node);
|
||||
|
||||
/**
|
||||
* Release meory used by libxml2, to only call before exit.
|
||||
*/
|
||||
static void releaseLibXml();
|
||||
|
||||
private:
|
||||
|
||||
/// From IStream
|
||||
|
|
|
@ -103,13 +103,11 @@ void CIXml::release ()
|
|||
// Free it
|
||||
xmlClearParserCtxt (_Parser);
|
||||
xmlFreeParserCtxt (_Parser);
|
||||
// commented due to the bug #857 xmlCleanupParser ();
|
||||
|
||||
_Parser = NULL;
|
||||
}
|
||||
|
||||
// Not initialized
|
||||
_Parser = NULL;
|
||||
_CurrentElement = NULL;
|
||||
_CurrentNode = NULL;
|
||||
_PushBegin = false;
|
||||
|
@ -1143,6 +1141,11 @@ bool CIXml::getContentString (std::string &result, xmlNodePtr node)
|
|||
|
||||
// ***************************************************************************
|
||||
|
||||
void CIXml::releaseLibXml()
|
||||
{
|
||||
xmlCleanupParser();
|
||||
}
|
||||
|
||||
} // NLMISC
|
||||
|
||||
#endif // NL_DONT_USE_EXTERNAL_CODE
|
||||
|
|
|
@ -664,6 +664,7 @@ void release()
|
|||
NLGUI::CDBManager::release();
|
||||
CWidgetManager::release();
|
||||
CViewRenderer::release();
|
||||
CIXml::releaseLibXml();
|
||||
|
||||
#if FINAL_VERSION
|
||||
// openURL ("http://www.ryzomcore.org/exit/");
|
||||
|
|
Loading…
Reference in a new issue