diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-02 18:20:49 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-02 18:20:49 +0200 |
| commit | c00b2271e6295c248c18d1bd62e14df372004e85 (patch) | |
| tree | ed87936f9a2f5733f5891d247d6046f69a5ad9aa /tests | |
| parent | ddfb5f9abcc398843e48885bbc8b3e4439c14e7b (diff) | |
| download | python-apt-c00b2271e6295c248c18d1bd62e14df372004e85.tar.gz | |
* progress.cc:
- fix memleak in progress.cc
* tests/memleak.py:
- uncomment the mem-leak code
* doc/examples/sources.py:
- improved the example
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): |
