Whether this registry has been disposed.
Create a tracked ref for a resolved service value.
The service token.
The resolved service instance.
A new ServiceRef<T> linked to this registry.
Check for potential leaks: refs that have been alive longer
than maxAgeMs without being released.
This is a heuristic — long-lived refs (e.g. for the lifetime of the app) are expected. Use this for debugging / dev mode.
Threshold in ms.
Force-release all active refs.
Called automatically when the owning SynapseContext is disposed.
After this, all refs' .current will throw RefReleasedError.
Register a handler for GC-detected leaks.
Called when a ServiceRef is garbage collected without
.release() having been called first.
Receives a LeakReport for each leak.
Number of active refs for a specific token.
Centralized registry that tracks all active ServiceRefs.
Provides ref counting, introspection, and leak detection via
FinalizationRegistry. EachSynapseContextowns at most oneRefRegistry(created lazily on firstacquireRef()).Since
1.2.0