From a057817a0983b3a3190f6773101f788f2c6278ba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 10 Jan 2012 19:02:55 +0300 Subject: Move clieanup for libxml2 to xml.cpp --- src/client.cpp | 3 +-- src/utils/xml.cpp | 6 ++++++ src/utils/xml.h | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index 88fe8c443..0f82a4514 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -741,8 +741,7 @@ void Client::gameClear() if (logger) logger->log1("Quitting4"); - // Shutdown libxml - xmlCleanupParser(); + XML::cleanupXML(); if (logger) logger->log1("Quitting5"); diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index d1df63510..9d6858d9d 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -181,4 +181,10 @@ namespace XML xmlSetGenericErrorFunc(nullptr, xmlNullLogger); } + // Shutdown libxml + void cleanupXML() + { + xmlCleanupParser(); + } + } // namespace XML diff --git a/src/utils/xml.h b/src/utils/xml.h index 849bc2060..fac90c63d 100644 --- a/src/utils/xml.h +++ b/src/utils/xml.h @@ -100,6 +100,8 @@ namespace XML XmlNodePtr findFirstChildByName(XmlNodePtr parent, const char *name); void initXML(); + + void cleanupXML(); } #define for_each_xml_child_node(var, parent) \ -- cgit v1.2.3-70-g09d2