When I create a tween, sometimes I do something like this:
TweenMax.to(greyCircle, SELECT_TRANSITION_TIME, { alpha:0, onComplete:
function ():void
{
isSelectedTransitioning = false;
greyCircle.visible = false;
} });
And sometimes I pass in parameters using onCompleteParams.
My question is this:
Now that the tween object (created by the static function TweenMax.to) has a reference to this anonymous function, and perhaps some objects in the onCompleteParams as well, will the function and parameter objects now no longer be collected during garbage collection, even though the tween may have completed?
Does it make any difference for GC if the function passed in is not anonymous?
Hunting for memory leaks…
Thanks, I’ve created this post on the greensock forum, which helps me with my understanding…