Class: Disposable

H.util.Disposable

new H.util.Disposable ()

This class represents an object that can be safely disposed.

Methods

addOnDisposeCallback (callback, opt_scope)

This method adds a callback which to be triggered when an object is disposed.

Name Type Description
callback function

A callback function to add

opt_scope Object optional

An object representing the scope

dispose ()

Disposes of the object. If the object hasn't already been disposed of, calls H.util.Disposable#disposeInternal. Child classes should override the disposeInternal in order to cleanup references, resources and other disposable data.

disposeInternal ()

Performs appropriate cleanup.