<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [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>
