Last change
on this file since 105420 was 105420, checked in by vboxsync, 7 months ago |
libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730
|
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
File size:
493 bytes
|
Line | |
---|
1 | #!/usr/bin/env python3
|
---|
2 | import sys
|
---|
3 | import setup_test
|
---|
4 | import libxml2
|
---|
5 | try:
|
---|
6 | import StringIO
|
---|
7 | str_io = StringIO.StringIO
|
---|
8 | except:
|
---|
9 | import io
|
---|
10 | str_io = io.StringIO
|
---|
11 |
|
---|
12 | # Memory debug specific
|
---|
13 | libxml2.debugMemory(1)
|
---|
14 |
|
---|
15 | i = 0
|
---|
16 | while i < 5000:
|
---|
17 | f = str_io("foobar")
|
---|
18 | buf = libxml2.inputBuffer(f)
|
---|
19 | i = i + 1
|
---|
20 |
|
---|
21 | del f
|
---|
22 | del buf
|
---|
23 |
|
---|
24 | # Memory debug specific
|
---|
25 | libxml2.cleanupParser()
|
---|
26 | if libxml2.debugMemory(1) == 0:
|
---|
27 | print("OK")
|
---|
28 | else:
|
---|
29 | print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
|
---|
30 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.