# lib/goog/disposable/idisposable.js

    1// Copyright 2011 The Closure Library Authors. All Rights Reserved.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7//      http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS-IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.1415/**16 * @fileoverview Definition of the disposable interface.  A disposable object17 * has a dispose method to to clean up references and resources.18 * @author nnaze@google.com (Nathan Naze)19 */202122goog.provide('goog.disposable.IDisposable');23242526/**27 * Interface for a disposable object.  If a instance requires cleanup28 * (references COM objects, DOM notes, or other disposable objects), it should29 * implement this interface (it may subclass goog.Disposable).30 * @interface31 */32goog.disposable.IDisposable = function() {};333435/**36 * Disposes of the object and its resources.37 * @return {void} Nothing.38 */39goog.disposable.IDisposable.prototype.dispose = goog.abstractMethod;404142/**43 * @return {boolean} Whether the object has been disposed of.44 */45goog.disposable.IDisposable.prototype.isDisposed = goog.abstractMethod;