Future release()

Closes all registered resources.

This method is automatically invoked by Application.stop.

Source

static Future release() async {
  await Future.wait(_registrations.map((r) => r.close()));
  _registrations = [];
}