ActionScript Gotcha #345: Recursive Getter
Here's a great way to create an infinite loop, and crash the Flash player with a stack overflow:
Yes, that should be:
A single missing underscore leads to disaster!
public function get myVar(): MovieClip
{
return myVar;
}
Yes, that should be:
public function get myVar(): MovieClip
{
return _myVar;
}
A single missing underscore leads to disaster!