InternalUse ctx.acquireRef(token) or RefRegistry.acquire() to create refs.
Unique reference ID (monotonically increasing within a registry).
performance.now() timestamp when this ref was acquired.
How long this ref has been alive, in ms.
Whether this reference is still valid (not released).
The token this ref was acquired for.
Alias for release. Implements Disposable.
Release this reference, decrementing the ref count.
After release:
.current throws RefReleasedError.alive returns falseSafe to call multiple times (idempotent).
Create a weak reference that does not prevent garbage collection.
The returned WeakServiceRef can be shared to components that
only need the service optionally — if the strong refs are all
released and the GC collects the object, .deref() returns
undefined instead of throwing.
A tracked, ref-counted reference to a resolved service.
Provides memory-safe access: accessing
.currentafter.release()throws RefReleasedError instead of returning a stale value.Since
1.2.0
Example