Agreed. Most of these deletes are probably someone thinking that they
are 'helping' the garbage collector, but they aren't. The GC still
has to prove that the object pointed to by the deleted property is not
referenced elsewhere.
The only case where you would have to be careful would be if somewhere
else in the code we are distinguishing between these properties having
a `null` value and and undefined value (see)[http://tinyurl.com/
2z3q2o], or we are testing for the existence of the property using
`in` or `hasOwnProperty`.
On 2008-02-07, at 19:23 EST, Henry Minsky wrote:
I think setting them to null would probably be best.
On Thu, Feb 7, 2008 at 6:18 PM, Philip Romanik
<[EMAIL PROTECTED]> wrote:
Hi Henry,
From looking at the book it seems that delete is only appropriate
for arrays and dynamic instance variables. Since we're trying not to
use dynamic classes, can I remove lines like this from code (for
swf9):
delete this.p;
delete this.data;
delete this.__LZlastdotdot;
delete this.context;
delete this.__LZtracking;
(These lines come from LzDatapointer)
Thanks!
Phil
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]