Bugfix: Ensure cleanup is properly triggered
My refactoring in v2.6.1 introduced two memory-related problems:
- the
childrenToAnimate
array was only being cleared if the user supplied anonFinishAll
hook. - the
childrenData
(the object that holds refs and other data about rendered children) was never having items deleted. This meant that items removed from the DOM wouldn't be cleared by the garbage collector, because the reference never died.
Huge thanks to @haste for finding and fixing these issues in #93