Skip to content

SharedComponentAcquisition<TComponent>

One consumer’s hold on a shared component.

Releasing it is idempotent: the first call drops the hold, and every later call — including the one the consumer link makes when the consumer unloads — does nothing.

Import:

import type { SharedComponentAcquisition } from '@mnaoumov/obsidian-lib/components/shared-component-pool-component';

Signature:

export interface SharedComponentAcquisition<TComponent extends Component> extends DisposableEx

Extends: DisposableEx

Properties

PropertyTypeDescription
componentTComponentThe shared component, loaded. Every consumer of the same key receives the same instance.
isReleasedbooleanWhether this acquisition has been released.
release() => voidReleases this acquisition. The shared component is unloaded when its last acquisition is released.

Links to this page: