remove<T> method

  1. @override
  2. @mustCallSuper
bool remove<T>()
inherited

Dispose bind from the memory

Implementation

@override
@mustCallSuper
bool remove<T>() {
  final type = _getInjectType<T>();
  if (_singletonBinds.containsKey(type)) {
    var singletonBind = _singletonBinds[type]!;
    disposeResolverFunc?.call(singletonBind.value);
    _singletonBinds.remove(type);
    return true;
  } else {
    return false;
  }
}