After you are finished, libxslt and
libxml provide functions for deallocating
memory.
xsltFreeStylesheet(cur);
xmlFreeDoc(res);
xmlFreeDoc(doc);
xsltCleanupGlobals();
xmlCleanupParser();Free the memory used by your stylesheet.Free the memory used by the results document.Free the memory used by your original document.Free memory used by libxslt global
variablesFree memory used by the XML parser
