Fixed: Release libxml2 structures before exit

--HG--
branch : develop
This commit is contained in:
kervala 2016-12-04 19:17:21 +01:00
parent 09c99dd2c3
commit c71f712d11
3 changed files with 11 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -664,6 +664,7 @@ void release()
NLGUI::CDBManager::release();
CWidgetManager::release();
CViewRenderer::release();
CIXml::releaseLibXml();
#if FINAL_VERSION
// openURL ("http://www.ryzomcore.org/exit/");