registerReclaimable method
Chains together objects, so when over is reclaimed, children are reclaimed
-
Application: Component reclaim reclaims listeners as those objects are owned by component
- Associates a reclaimable object with this object so that they will be reclaimed
- together.
- @param {goog.reclaimable.IReclaimable} reclaimable that will be reclaimed when
-
this object is reclaimed.
Implementation
@override
void registerReclaimable(IReclaimable reclaimable)
{
if (this._reclaimed) {
reclaimable.reclaim();
}
else {
/* Many Reclaimable objects are created which will never own others, so save */
if (this._ownedReclaimables == null) {
this._ownedReclaimables = <IReclaimable>[];
}
// Add reclaimable.
this._ownedReclaimables!.add(reclaimable);
}
}