mbostock/d3 — pull request #2116 by mbostock (2014-11-14 19:00:28+00:00)
Title: Allow garbage collection of inherited transition.

When creating a new transition derived from an existing transition, the new transition’s parameters (reference time, delay, duration and easing) are inherited. However, we were inadvertently also capturing a reference to the old transition lock, including any tweens and listeners. Even though this object wasn’t used by the transition after creation, it’s likely that the garbage collector wasn’t smart enough to free the old lock. We now set the lock to null explicitly so as to allow garbage collection and avoid a memory leak with chained transitions. Related #2110.

Also, create a new object when using transition.transition rather than using Object.create. It’s slightly more code, but it’s simpler.