Deleting objects

user at domain.invalid user at domain.invalid
Mon Jan 26 15:04:16 EST 2004


Say I have a database object 'db',
that contains table objects, that contain field
objects so that I can do things like this:

print db.table.field.value()


Now, after plundering the database for a while,
the db objects heads a tree of lots of data.

If I want to "reset" the object so that I get
all of my memory back, can I just do:

	del db

or maybe:

	for t in db.tables:
		del t
	
and expect that I have cleaned up all of my
memory?

After writing this out, I see that the answer
is clearly yes, but I will post anyway.

Thanks

Toby




More information about the Python-list mailing list