372 Chapter 12: ActionScript Dictionary
delete array[2];
trace(my_array.length);
Usage 4: The following example illustrates the behavior of delete on object references.
// create a new object, and assign the variable ref1
// to refer to the object
ref1 = new Object();
ref1.name = "Jody";
// copy the reference variable into a new variable
// and delete ref1
ref2 = ref1;
delete ref1;
If ref1 had not been copied into ref2, the object would have been deleted when ref1 was
deleted, because there would be no references to it. If you delete
ref2, there will no longer be any
references to the object; it will be destroyed, and the memory it was using will be made available.
See also
var
do while
Availability
Flash Player 4.
Usage
do {
statement(s)
} while (condition)
Parameters
condition
The condition to evaluate.
statement(s) The statement(s) to execute as long as the condition parameter evaluates
to
true.
Returns
Nothing.
Description
Statement; executes the statements, and then evaluates the condition in a loop for as long as the
condition is
true.
See also
break, continue