homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yappie
Recipients yappie
Date 2010年06月24日.19:32:47
SpamBayes Score 0.0021268784
Marked as misclassified No
Message-id <1277407969.42.0.292267385985.issue9072@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2010年06月24日 19:32:49yappiesetrecipients: + yappie
2010年06月24日 19:32:49yappiesetmessageid: <1277407969.42.0.292267385985.issue9072@psf.upfronthosting.co.za>
2010年06月24日 19:32:47yappielinkissue9072 messages
2010年06月24日 19:32:47yappiecreate

AltStyle によって変換されたページ (->オリジナル) /