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.
73 lines (34 loc) • 1.41 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [AutomaticGcStrategy](./rc-js-util.automaticgcstrategy.md)
## AutomaticGcStrategy class
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 [ReferenceCountedStrategy](./rc-js-util.referencecountedstrategy.md)<!-- -->.
**Signature:**
```typescript
export declare class AutomaticGcStrategy implements ILifecycleStrategy
```
**Implements:** [ILifecycleStrategy](./rc-js-util.ilifecyclestrategy.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createNode(owner)](./rc-js-util.automaticgcstrategy.createnode.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[onManagedObjectCreated(object)](./rc-js-util.automaticgcstrategy.onmanagedobjectcreated.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[onSharedPointerCreated(sharedPtr)](./rc-js-util.automaticgcstrategy.onsharedpointercreated.md)
</td><td>
</td><td>
</td></tr>
</tbody></table>