disposeContextZone method

void disposeContextZone(
  1. Zone contextZone
)

Disposes the contextZone and any related value.

Implementation

void disposeContextZone(Zone contextZone) {
  if (_zones.isNotEmpty) {
    if (identical(_zones.last, contextZone)) {
      var rmObj = _zones.removeLast();
      assert(identical(rmObj, contextZone));
    } else {
      var rm = _zones.remove(contextZone);
      assert(rm);
    }
  }

  _values[contextZone] = null;
}