unregisterModule method
Unregisters all dependencies that belong to a specific moduleId.
This is used internally during module disposal to clean up system resources.
Implementation
void unregisterModule(String moduleId) {
final typesToRemove = _registrationOwners.entries
.where((e) => e.value == moduleId)
.map((e) => e.key)
.toList();
for (final type in typesToRemove) {
_registrations.remove(type);
_registrationOwners.remove(type);
}
if (typesToRemove.isNotEmpty) {
AirLogger.debug(
'Unregistered module dependencies',
context: {'module': moduleId, 'count': typesToRemove.length},
);
}
}