more xml2 leak fixes

This commit is contained in:
Dane Springmeyer 2015-06-12 20:22:54 -07:00
parent 2b02677cb5
commit 9da198631b

View file

@ -2,6 +2,9 @@
#define TEST_MEMORY_CLEANUP #define TEST_MEMORY_CLEANUP
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/entities.h>
#include <libxml/globals.h>
#if defined(HAVE_CAIRO) #if defined(HAVE_CAIRO)
#include <cairo.h> #include <cairo.h>
#endif #endif
@ -13,13 +16,19 @@
namespace testing { namespace testing {
void run_cleanup() inline void run_cleanup()
{ {
// only call this once, on exit // only call this once, on exit
// to make sure valgrind output is clean // to make sure valgrind output is clean
// http://xmlsoft.org/xmlmem.html // http://xmlsoft.org/xmlmem.html
xmlCleanupCharEncodingHandlers(); xmlCleanupCharEncodingHandlers();
xmlCleanupEncodingAliases();
xmlCleanupGlobals();
xmlCleanupParser(); xmlCleanupParser();
xmlCleanupThreads();
xmlCleanupInputCallbacks();
xmlCleanupOutputCallbacks();
xmlCleanupMemory();
#if defined(HAVE_CAIRO) #if defined(HAVE_CAIRO)
// http://cairographics.org/manual/cairo-Error-handling.html#cairo-debug-reset-static-data // http://cairographics.org/manual/cairo-Error-handling.html#cairo-debug-reset-static-data