[Project_owners] clearing variables
rod.whiteley at gmail.com
Tue Feb 7 19:12:09 EST 2006
Eric H. Jung wrote:
> I suppose that question can be answered by someone who knows whether or
> not properties of a variable are deleted when the variable itself is
> deleted. Anyone?
Of course they are, but even that's not the whole point. Suppose your
foo = "sensitive data"
and later it executes:
foo = null
The string "sensitive data" is probably still in memory*, even though
the memory is available for reuse and might be overwritten later. Writing:
is no help. That only affects memory used by the property itself.
* And that's my question: is unused memory cleared immediately, or
cleared later by the garbage collector, or (most likely) not cleared at
all until something else happens to overwrite it?
More information about the Project_owners