PDA

View Full Version : TweenMax.killAllTweens leaving tweens visible in getAllTweens



creatify
December 2nd, 2008, 04:10 PM
I've posted on the greensock forums as well, but haven't had a response yet... any knowledge of this, I'd appreciate it:

After calling TweenMax.killAllTweens(), I still see tweens via TweenMax.getAllTweens(); I then proceed to loop through array and a) check the active property of each (all return false) and b) try to remove each Tween via TweenMax.removeTween(t) - but getAllTweens(); continues to return and array of tweens? I believe I'm racking up some memory usage due to these tweens not being removed killed - thoughts?

Thought I'd add to this - if utilizing the adobe debug players, and if you have ThunderBolt - you can see the traces of my attempt to clean up the tweens here:
1) use the arrow buttons to quickly toggle through 01,02,03 - this will allow tweens to build up fairly quickly
2) click the force GC button - that triggers killAllTweens and unloads all imagery (the only objects with tweens); - you'll see the trace
3) click the force GC button again - at this point, I'm looping through getAllTweens array and checking active and attempting removeTween(t) on each - you'll see traces here too

http://dev.etainia.com/fp_progress/

greensock
December 17th, 2008, 10:02 PM
Answered here:
http://forums.greensock.com/viewtopic.php?f=1&t=449&p=1796

(summary: Just needed to download the latest version of TweenMax)