dijit/Destroyable (version 1.10)

Summary

Mixin to track handles and release them when instance is destroyed.

Call this.own(...) on list of handles (returned from dojo/aspect, dojo/on, dojo/Stateful::watch, or any class (including widgets) with a destroyRecursive() or destroy() method. Then call destroy() later to destroy this instance and release the resources.

See the dijit/Destroyable reference documentation for more information.

Method Summary

  • destroy(preserveDom) Destroy this class, releasing any resources registered via own().
  • own() Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.

Methods

destroy(preserveDom)
Defined by dijit/Destroyable

Destroy this class, releasing any resources registered via own().

Parameter Type Description
preserveDom Boolean
own()
Defined by dijit/Destroyable

Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.

Returns:any | undefined

The array of specified handles, so you can do for example:

var handle = this.own(on(...))[0];
Error in the documentation? Can’t find what you are looking for? Let us know!