9 # Memory debug specific
10 libxml2.debugMemory(1)
13 f = StringIO.StringIO()
14 buf = libxml2.createOutputBuffer(f, "ISO-8859-1")
16 buf.writeString("bar")
20 if f.getvalue() != "foobar":
21 print "Failed to save to StringIO"
26 # Memory debug specific
27 libxml2.cleanupParser()
28 if libxml2.debugMemory(1) == 0:
31 print "Memory leak %d bytes" % (libxml2.debugMemory(1))