summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-10-02 18:34:44 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-10-02 18:34:44 +0200
commit05ac4479d4a37ca55e892c588bcb217fa21ba20a (patch)
tree1b1e8a8b75fa6812b12c7cde0e4218db5fa2b82c /tests
parent1427f53977faddace94c435f3a6b3c09d9a52660 (diff)
parentc00b2271e6295c248c18d1bd62e14df372004e85 (diff)
downloadpython-apt-05ac4479d4a37ca55e892c588bcb217fa21ba20a.tar.gz
* merged with python-apt--mvo
Diffstat (limited to 'tests')
-rwxr-xr-xtests/memleak.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/memleak.py b/tests/memleak.py
index 3e59cbb7..b5d05afc 100755
--- a/tests/memleak.py
+++ b/tests/memleak.py
@@ -10,11 +10,15 @@ import sys
cache = apt.Cache()
# memleak
-#for i in range(100):
-# cache.open(None)
-# print cache["apt"].name
-# time.sleep(1)
-# gc.collect()
+for i in range(100):
+ cache.open(None)
+ print cache["apt"].name
+ time.sleep(1)
+ gc.collect()
+ f = open("%s" % i,"w")
+ for obj in gc.get_objects():
+ f.write("%s\n" % str(obj))
+ f.close()
# memleak
#for i in range(100):