Nazariglez / pixi-tween

pixi-tween is a plugin for Pixi.js v3.0.8 or higher to create tween animations.
MIT License
98 stars 39 forks source link

fix: Remove expired inactive tweens #11

Closed ProbablePrime closed 5 years ago

ProbablePrime commented 7 years ago

Previously tweens were only Garbage collected if they were active and ended which could leave some tweens stuck in the tween manager's array.

This commit ensures that regardless of the active state the garbage collection code will have a chance to run.

Without this I had tween rapidly building in the array until the tab ran out of memory.

Ewan-Roberts commented 5 years ago

@Nazariglez Can you merge the above? I would prefer not to branch off a PR :P

Nazariglez commented 5 years ago

Sure! I've my pixi repositories unattended for a while, but the next weeks I'll refactor them and make sure that they work on the newest version of pixi.

@ProbablePrime thanks for your PR