UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

16 lines 923 B
import { type IManagedObject, type IManagedResourceNode, IPointer } from "../../lifecycle/manged-resources.js"; import type { ILifecycleStrategy } from "./i-lifecycle-strategy.js"; /** * @public * Automatically releases handles when objects are garbage collected. The implementation relies on `FinalizationRegistry`, * which comes with a large number of health warnings, you probably shouldn't use it in production for anything important... * * Do not use this for testing of library functions, instead use {@link ReferenceCountedStrategy}. */ export declare class AutomaticGcStrategy implements ILifecycleStrategy { createNode(owner: IManagedResourceNode | null): IManagedResourceNode; onSharedPointerCreated(sharedPtr: IManagedObject & IPointer): void; onManagedObjectCreated(object: IManagedObject): void; private readonly finalizationRegistry; } //# sourceMappingURL=automatic-gc-strategy.d.ts.map