dispose method

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

Implementation

@override
@mustCallSuper
void dispose() {
  if (kProfileMode) {
    PerformanceTiming.instance().mark(PERF_DISPOSE_EVENT_TARGET_START, uniqueId: hashCode);
  }

  _disposed = true;
  _eventHandlers.clear();
  super.dispose();

  if (kProfileMode) {
    PerformanceTiming.instance().mark(PERF_DISPOSE_EVENT_TARGET_END, uniqueId: hashCode);
  }
}