Registry
Registry helpers manage instance lifecycle and ref counting.
Functions
acquire(BlocClass, instanceKey?, options?)ensure(BlocClass, instanceKey?)borrow(BlocClass, instanceKey?)borrowSafe(BlocClass, instanceKey?)->{ error, instance }release(BlocClass, instanceKey?, forceDispose?)hasInstance(BlocClass, instanceKey?)getRefCount(BlocClass, instanceKey?)getAll(BlocClass)forEach(BlocClass, cb)clear(BlocClass)clearAll()
Notes
acquireincrements ref count and creates the instance if needed.ensurecreates if missing but does not increment ref count.borrowrequires an existing instance and does not increment ref count.releasedecrements ref count and disposes at 0 unless keepAlive.