beforeReclaim method

  1. @override
Future<Null> beforeReclaim()
override

Performs preparation for reclaim on all owned reclaimables once, then reclaims this object.

  • DO NOT OVERRIDE.

Implementation

@override
Future<Null> beforeReclaim() async
{
  if (!this._preparedForReclaim) {
    // Set flag to true first, in case during the chain of disposal this
    // gets reclaimed recursively.
    this._preparedForReclaim = true;

    await _beforeReclaimOwnedReclaimables();

    await beforeReclaimInternal();
  }
}