Last change
on this file since 17562 was 6076, checked in by vboxsync, 17 years ago |
Merged dmik/s2 branch (r25959:26751) to the trunk.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Date Revision Author Id
|
File size:
420 bytes
|
Line | |
---|
1 | #!/usr/bin/python -u
|
---|
2 | import sys
|
---|
3 | import libxml2
|
---|
4 | import StringIO
|
---|
5 |
|
---|
6 | # Memory debug specific
|
---|
7 | libxml2.debugMemory(1)
|
---|
8 |
|
---|
9 | i = 0
|
---|
10 | while i < 5000:
|
---|
11 | f = StringIO.StringIO("foobar")
|
---|
12 | buf = libxml2.inputBuffer(f)
|
---|
13 | i = i + 1
|
---|
14 |
|
---|
15 | del f
|
---|
16 | del buf
|
---|
17 |
|
---|
18 | # Memory debug specific
|
---|
19 | libxml2.cleanupParser()
|
---|
20 | if libxml2.debugMemory(1) == 0:
|
---|
21 | print "OK"
|
---|
22 | else:
|
---|
23 | print "Memory leak %d bytes" % (libxml2.debugMemory(1))
|
---|
24 | libxml2.dumpMemory()
|
---|
25 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.