diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-02 18:34:44 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-02 18:34:44 +0200 |
| commit | 05ac4479d4a37ca55e892c588bcb217fa21ba20a (patch) | |
| tree | 1b1e8a8b75fa6812b12c7cde0e4218db5fa2b82c /tests | |
| parent | 1427f53977faddace94c435f3a6b3c09d9a52660 (diff) | |
| parent | c00b2271e6295c248c18d1bd62e14df372004e85 (diff) | |
| download | python-apt-05ac4479d4a37ca55e892c588bcb217fa21ba20a.tar.gz | |
* merged with python-apt--mvo
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/memleak.py | 14 |
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): |
