freeAllResources method

  1. @override
Future<bool> freeAllResources([
  1. bool throwOnFailure = false
])
override

Implementation

@override
Future<bool> freeAllResources([bool throwOnFailure = false]) async {
  try {
    await disconnectFromRelays();
    await streamsController.close();

    nostrRegistry.clear();

    return true;
  } catch (e) {
    if (throwOnFailure) {
      rethrow;
    }

    return false;
  }
}