MCPcopy Index your code
hub / github.com/angular/angular / dispose

Method dispose

adev/src/app/features/home/animation/animation.ts:274–282  ·  view source on GitHub ↗

* Cleans all of the resources that might cause memory leaks (e.g. plugins). * Resets the animation and cleans the definition.

()

Source from the content-addressed store, hash-verified

272 * Resets the animation and cleans the definition.
273 */
274 dispose() {
275 for (const plugin of this.plugins) {
276 plugin.destroy();
277 }
278 this.reset();
279 this.rules = [];
280 this._duration = 0;
281 this.plugins = [];
282 }
283
284 /**
285 * Update the frame/animation by a given time.

Callers

nothing calls this directly

Calls 2

resetMethod · 0.95
destroyMethod · 0.65

Tested by

no test coverage detected