deleting objects present in a list
dksreddy at gmail.com
Tue Apr 20 21:21:41 CEST 2010
I have large number of objects created and to handle them properly, I
store them in a list. How can I delete all of these objects (delete I
mean here is to remove the object from memory not just from list)? I
cannot use the list to iterate through the objects to delete them.
Because 'del' only reduces the reference count and as it is present in
the list it is not deleted. I cannot delete the list because I loose
control over the objects.
Can anyone give a nice solution for this?
More information about the Python-list