Deleting objects on the fly

Terry Reedy tjreedy at udel.edu
Fri Aug 10 20:49:28 CEST 2007


"Campbell Barton" <cbarton at metavr.com> wrote in message 
news:46BC35F2.4070600 at metavr.com...
| Michele Simionato wrote:
| > Probably not, 'del x' just decrements the reference count,

Or as
http://docs.python.org/ref/del.html
puts it, " Deletion of a name removes the binding of that name from the 
local or global namespace,"

| del x will remove x from memory if nothing else is refering to it,

This is implementation dependent: true for CPython, not for Jython, ??? for 
IronPython.

tjr






More information about the Python-list mailing list