On Tue, Jan 5, 2010 at 1:46 PM, 朱淳 <[email protected]> wrote: > I've token a dictionary to save filenames, and write it into "constant.py". > And I think it's a good method to create a class as Andre wrote. Thank you > all! > By the way, if I close a open file object, will the closed file object still > occupy the memory ? As I saw in a list, this kind of unusable file object > wasn't cleaned by GC. What will happen if there's no list?
In general, when an object is not referred any more in Python code, it will be garbage collected (and thus the memory it occupies will become free); however, this is not robust nor fully consistent over implementation, and it is therefore unadvisable to write code that relies too heavily on this. -- André Engels, [email protected] _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
