Exemple #1
0
func CheckXmlMemoryLeaks(t *testing.T) {
	help.LibxmlCleanUpParser()
	if !help.LibxmlCheckMemoryLeak() {
		t.Errorf("Memory leaks: %d!!!", help.LibxmlGetMemoryAllocation())
		help.LibxmlReportMemoryLeak()
	}
}
Exemple #2
0
func CheckXmlMemoryLeaks(t *testing.T) {
	println("Cleaning up parser...")
	help.LibxmlCleanUpParser()
	println("Done cleaning parser, checking for libxml leaks...")
	if !help.LibxmlCheckMemoryLeak() {
		println("Found memory leaks!")
		t.Errorf("Memory leaks: %d!!!", help.LibxmlGetMemoryAllocation())
		help.LibxmlReportMemoryLeak()
	}
}