Path: blob/trunk/third_party/closure/goog/disposable/idisposable.js
2868 views
// Copyright 2011 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Definition of the disposable interface. A disposable object16* has a dispose method to to clean up references and resources.17* @author [email protected] (Nathan Naze)18*/192021goog.provide('goog.disposable.IDisposable');22232425/**26* Interface for a disposable object. If a instance requires cleanup27* (references COM objects, DOM nodes, or other disposable objects), it should28* implement this interface (it may subclass goog.Disposable).29* @record30*/31goog.disposable.IDisposable = function() {};323334/**35* Disposes of the object and its resources.36* @return {void} Nothing.37*/38goog.disposable.IDisposable.prototype.dispose = goog.abstractMethod;394041/**42* @return {boolean} Whether the object has been disposed of.43*/44goog.disposable.IDisposable.prototype.isDisposed = goog.abstractMethod;454647