Deleting objects

Jeff Epler jepler at unpythonic.net
Mon Jan 26 22:04:10 CET 2004


On Mon, Jan 26, 2004 at 08:04:16PM +0000, user at domain.invalid wrote:
[Can I execute]
> 	for t in db.tables:
> 		del t
> 	
> and expect that I have cleaned up all of my
> memory?

The above code clearly doesn't "free" anything, because there are still
references to each of the values 't' has at deletion---namely, the entry
in db.tables!

Jeff




More information about the Python-list mailing list