dispose method

  1. @protected
  2. @mustCallSuper
void dispose()

Releases any resources used by the object.

Implementation

@protected
@mustCallSuper
void dispose() {
  // TODO(polina-c): stop duplicating code across disposables
  // https://github.com/flutter/flutter/issues/137435
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectDisposed(object: this);
  }
  _arenaEntry?.resolve(GestureDisposition.rejected);
  _arenaEntry = null;
  assert(() {
    _pendingDelta = null;
    return true;
  }());
}