How to clean a module?

Diez B. Roggisch deets at nospam.web.de
Fri Jun 1 06:50:13 EDT 2007


ai wrote:

> Yes, you are right.
> But from this problem, could I infer that the statement "del xxx"
> doesn't release the memory which xxx used?

It just removes the name xxx from the current scope - which will result in a
reference counter decrease. If that was the last reference, the object will
be destroyed. Most times. There are some special cases involving the usage
of __del__-methods on objects.

Diez



More information about the Python-list mailing list