Flash Action Scripting can handle garbage collection - i.e. it does not explicitly delete objects when the program terminates as the objects are deleted automatically by using the delete keyword. This is shown below.

delete personl; // the object instance personl is deleted by the delete keyword

Sometimes instead of deleting the whole object, we can also delete parts of the object as described below.

delete personl.firstName; // here only the property firstname is deleted and not the whole object.

Name:  Programming Fundamentals -Object Destructio.jpg
Views: 36
Size:  41.2 KB