Objectgoog.Disposable
goog.structs.SimplePool
initialCount
:
Initial number of objects to populate the free pool at construction time.
|
maxCount
:
Maximum number of objects to keep in the free pool.
|
![]()
Populates the pool with initialCount objects.
Arguments:
|
code » | ||
Should be overriden by sub-classes to return an instance of the object type
that is expected in the pool.
Returns:
The created object.
|
code » | ||
![]()
Function for overriding createObject. The avoids a common case requiring
subclassing this class.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
Should be overriden to dispose of an object. Default implementation is to
remove all of the object's members, which should render it useless. Calls the
object's dispose method, if available.
Arguments:
|
code » | ||
![]()
Function for overriding disposeObject. The avoids a common case requiring
subclassing this class.
|
code » | ||
Gets a new object from the the pool, if there is one available, otherwise
returns null.
Returns:
An object from the pool or a new one if necessary.
|
code » | ||
![]()
Releases the space in the pool held by a given object -- i.e., remove it from
the pool and frees up its space.
Arguments:
|
code » | ||
![]()
Sets the {@code createObject} function which is used for creating a new
object in the pool.
Arguments:
|
code » | ||
![]()
Sets the {@code disposeObject} function which is used for disposing of an
object in the pool.
Arguments:
|
code » |
![]()
No description.
|
code » | |
![]()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend {@code goog.Disposable} should
override this method. For example:
mypackage.MyClass = function() { goog.Disposable.call(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { mypackage.MyClass.superClass_.disposeInternal.call(this); // Dispose logic specific to MyClass. ... }; |
code » | |
No description.
Returns:
Whether the object has been disposed of.
|
code » | |
No description.
Returns:
Whether the object has been disposed of.
|
code » |