Files
shaka-player/lib/util/i_destroyable.js
T
Aaron Vaage 546942fc3a Created Destroyer Class To Handler IDestroyable
Created the Destroyer class to handle working with IDestroyable so that
IDestroyable can be a simple interface (no more static methods).

Change-Id: I5afd915b895a4c60d758475a2b879bf0eb0096c9
2018-07-09 22:19:19 +00:00

38 lines
1.1 KiB
JavaScript

/**
* @license
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
goog.provide('shaka.util.IDestroyable');
/**
* An interface to standardize how objects are destroyed.
*
* @interface
* @exportInterface
*/
shaka.util.IDestroyable = class {
/**
* Request that this object be destroyed, releasing all resources and shutting
* down all operations. Returns a Promise which is resolved when destruction
* is complete. This Promise should never be rejected.
*
* @return {!Promise}
* @exportInterface
*/
destroy() {}
};