VirtualBox

source: vbox/trunk/src/libs/libxml2-2.6.31/python/tests/inbuf.py@ 39915

Last change on this file since 39915 was 39915, checked in by vboxsync, 13 years ago

libxml-2.6.31 unmodified

  • Property svn:eol-style set to native
File size: 420 bytes
Line 
1#!/usr/bin/python -u
2import sys
3import libxml2
4import StringIO
5
6# Memory debug specific
7libxml2.debugMemory(1)
8
9i = 0
10while i < 5000:
11 f = StringIO.StringIO("foobar")
12 buf = libxml2.inputBuffer(f)
13 i = i + 1
14
15del f
16del buf
17
18# Memory debug specific
19libxml2.cleanupParser()
20if libxml2.debugMemory(1) == 0:
21 print "OK"
22else:
23 print "Memory leak %d bytes" % (libxml2.debugMemory(1))
24 libxml2.dumpMemory()
25
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette