Capítulo 41 de 411

Chapter 41: Timeline.autoRemoveChildren

Core Idea

autoRemoveChildren (Boolean) controls whether child tweens/timelines are removed as soon as they complete.

Key Concepts

  • Default false for normal timelines, but true on gsap.globalTimeline — completed children are pruned automatically there to avoid memory buildup.

Code Examples

let tl = gsap.timeline({ autoRemoveChildren: true });

Key Takeaways

  1. Turning this on for a normal timeline means you lose the ability to restart()/seek() back to already-completed children.

Connects To

  • Timeline.remove(): manual equivalent of what this does automatically.