trackControllerDisposal static method
void
trackControllerDisposal(
- dynamic controller
Track Controller disposal (only called when enabled) Internal use only - called from SwiftController dispose
Implementation
static void trackControllerDisposal(dynamic controller) {
if (!_enabled || !_trackDependencies) return;
final id = getControllerId(controller);
_controllerRefs.remove(id);
// Keep registry entry for history, but mark as disposed
if (_controllerRegistry.containsKey(id)) {
_controllerRegistry[id] = _ControllerInfo(
id: id,
name: _controllerRegistry[id]!.name,
type: _controllerRegistry[id]!.type,
createdAt: _controllerRegistry[id]!.createdAt,
disposedAt: DateTime.now(),
);
}
}