Constructor
new Destroyer(callback)
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | A callback to destroy an object. This callback will only be called once regardless of how many times |destroy| is called. |
- Source:
Members
(private) onDestroy_ :function():!Promise
Type:
- function():!Promise
- Source:
Methods
destroy() → (non-null) {Promise}
Request that the destroy callback be called. Will return a promise that
will resolve once the callback terminates. The promise will never be
rejected.
- Source:
Returns:
- Type
- Promise
destroyed() → {boolean}
Check if |destroy| has been called. This returning |true| does not mean
that the promise returned by |destroy| has resolved yet.
- Source:
Returns:
- Type
- boolean