more xml2 leak fixes
This commit is contained in:
parent
2b02677cb5
commit
9da198631b
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue