MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlCleanupParser

Function xmlCleanupParser

ThirdParty/libxml2/vtklibxml2/threads.c:625–656  ·  view source on GitHub ↗

* xmlCleanupParser: * * This function name is somewhat misleading. It does not clean up * parser state, it cleans up memory allocated by the library itself. * It is a cleanup function for the XML library. It tries to reclaim all * related global memory allocated for the library processing. * It doesn't deallocate any document related memory. One should * call xmlCleanupParser() only when th

Source from the content-addressed store, hash-verified

623 * to avoid leak reports from valgrind !
624 */
625void
626xmlCleanupParser(void) {
627 if (!xmlParserInitialized)
628 return;
629
630 /* These functions can call xmlFree. */
631
632 xmlCleanupCharEncodingHandlers();
633#ifdef LIBXML_CATALOG_ENABLED
634 xmlCatalogCleanup();
635#endif
636#ifdef LIBXML_SCHEMAS_ENABLED
637 xmlSchemaCleanupTypes();
638 xmlRelaxNGCleanupTypes();
639#endif
640
641 /* These functions should never call xmlFree. */
642
643 xmlCleanupDictInternal();
644 xmlCleanupRandom();
645 xmlCleanupGlobalsInternal();
646 /*
647 * Must come last. On Windows, xmlCleanupGlobalsInternal can call
648 * xmlFree which uses xmlMemMutex in debug mode.
649 */
650 xmlCleanupMemoryInternal();
651
652 xmlGlobalInitMutexDestroy();
653
654 xmlParserInitialized = 0;
655 xmlParserInnerInitialized = 0;
656}
657
658#if defined(HAVE_ATTRIBUTE_DESTRUCTOR) && \
659 !defined(LIBXML_THREAD_ALLOC_ENABLED) && \

Callers 11

closeFileMethod · 0.85
closeFileMethod · 0.85
xmllint.cFile · 0.85
mainFunction · 0.85
mainFunction · 0.85
threads.cFile · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
FreeDocMethod · 0.85
LoadArgumentsFromXMLMethod · 0.85

Calls 9

xmlCatalogCleanupFunction · 0.85
xmlSchemaCleanupTypesFunction · 0.85
xmlRelaxNGCleanupTypesFunction · 0.85
xmlCleanupDictInternalFunction · 0.85
xmlCleanupRandomFunction · 0.85
xmlCleanupMemoryInternalFunction · 0.85

Tested by 1

mainFunction · 0.68