disposeAll static method

void disposeAll()

disposeAll method.

Implementation

static void disposeAll() {
  // Process auto-dispose in batch
  /// Stores the =.
  final typesToDispose = List<Type>.from(_autoDispose);
  _autoDispose.clear();

  /// for method.
  for (final type in typesToDispose) {
    /// Stores the =.
    final instance = _instances.remove(type);

    /// if method.
    if (instance is Injectable) {
      instance.onDispose();
    }
    _notify('disposeAuto', type);
  }
}