I heard that Flash does not actually destroy Objects, but rather does not
allow you access them anymore. Is that true and if it is, can it become
problematic?
----- Original Message -----
From: "Peter Hall" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Tuesday, October 03, 2006 3:55 PM
Subject: Re: [Flashcoders] when classes die...
public function destroy():Void {
// Perform clean-up.
delete this;
}
This code is garbage. The delete operator operates on variables and
not on values. So "delete this" will just delete a variable called
"this" within the scope of that function. To remove an object from
memory, you have to remove all references to it. And you can do that
by using delete on each one of those references, or by setting those
variables to some other value.
Peter
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com