It will not delete the referenced object from memory directly. This of course frees any reference it was holding, potentially freeing that object for garbage collection (as described in my previous article). My understanding is that the delete keyword deletes the actual variable definition, not just the variable’s value. If not, please let me know in the comments – I don’t want to lead anyone astray. There isn’t a lot of documentation on this topic, and what there is is hard to find, so much the following is conjecture and interpolation from related exploration, but I think it is fairly accurate. In the comments of my previous post about how the garbage collector works in Flash Player 9, Cédric Néhémie asked a great question about why using delete on a property of a sealed (non-dynamic) class throws an error in ActionScript 3, and whether it will delete the actual object in memory.
0 Comments
Leave a Reply. |