constructor(callback) {
    /** @private {boolean} */
    this.destroyed_ = false;

    /** @private {!shaka.util.PublicPromise} */
    this.waitOnDestroy_ = new shaka.util.PublicPromise();

    /** @private {function():!Promise} */
    this.onDestroy_ = callback;
  }
@param {function():!Promise} callback
   A callback to destroy an object. This callback will only be called once
   regardless of how many times |destroy| is called.