New submission from Slava <bomb...@gmail.com>: I don't know whether this is a bug, but my exhaustive search led me to "Python can't really unload modules" from every direction, which I find hard to believe, I don't know where else to go with this.
The problem: import gc, sys print len(gc.get_objects()) # 4073 # starting with 4073 objects in memory import httplib del sys.modules["httplib"] del httplib # httplib should be unloaded # and garbage collected as it is unreachable gc.collect() print len(gc.get_objects()) # 6745 # 6745 objects in memory (2000+ stray objects) This applies to almost any module. Is this a bug or somehow correctable? ---------- components: None messages: 108545 nosy: yappie priority: normal severity: normal status: open title: Unloading modules - memleaks? type: resource usage versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9072> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com