disposeRegistry static method
Disposes all callbacks in registry and clears it.
Intended to be called at shutdown by each concrete callback type via a typed static wrapper:
static void disposeRegistry() => CallbackD.disposeRegistry(_registry);
Implementation
static void disposeRegistry(List<CallbackD> registry) {
registry.forEach((f) => f.dispose());
registry.clear();
}