Exemplo n.º 1
0
func CheckXmlMemoryLeaks(t *testing.T) {
	help.LibxmlCleanUpParser()
	if !help.LibxmlCheckMemoryLeak() {
		t.Errorf("Memory leaks: %d!!!", help.LibxmlGetMemoryAllocation())
		help.LibxmlReportMemoryLeak()
	}
}
Exemplo n.º 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()
	}
}