<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [SharedObjectCleanup](./rc-js-util.sharedobjectcleanup.md)

## SharedObjectCleanup class

Provides reasonable defaults for cleaning up a handle to a `JsInterop::ASharedMemoryObject`<!-- -->.

**Signature:**

```typescript
export declare class SharedObjectCleanup implements IOnFreeListener 
```
**Implements:** [IOnFreeListener](./rc-js-util.ionfreelistener.md)

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(sharedObject, ownershipKind)](./rc-js-util.sharedobjectcleanup._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `SharedObjectCleanup` class


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[Options](./rc-js-util.sharedobjectcleanup.options.md)


</td><td>

`static`


</td><td>

{ new (debugName: string, protectedView: [IDebugProtectedViewFactory](./rc-js-util.idebugprotectedviewfactory.md) \| null, ownershipKind: [ESharedObjectOwnerKind](./rc-js-util.esharedobjectownerkind.md)<!-- -->): { readonly debugName: string; readonly protectedView: [IDebugProtectedViewFactory](./rc-js-util.idebugprotectedviewfactory.md) \| null; readonly ownershipKind: [ESharedObjectOwnerKind](./rc-js-util.esharedobjectownerkind.md)<!-- -->; }; }


</td><td>


</td></tr>
<tr><td>

[ownershipKind](./rc-js-util.sharedobjectcleanup.ownershipkind.md)


</td><td>

`protected`

`readonly`


</td><td>

[ESharedObjectOwnerKind](./rc-js-util.esharedobjectownerkind.md)


</td><td>


</td></tr>
<tr><td>

[ptr](./rc-js-util.sharedobjectcleanup.ptr.md)


</td><td>

`readonly`


</td><td>

number


</td><td>


</td></tr>
<tr><td>

[wrapper](./rc-js-util.sharedobjectcleanup.wrapper.md)


</td><td>

`readonly`


</td><td>

[IEmscriptenWrapper](./rc-js-util.iemscriptenwrapper.md)<!-- -->&lt;[IInteropBindings](./rc-js-util.iinteropbindings.md)<!-- -->&gt;


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[createWithCleanup(sharedObject, options)](./rc-js-util.sharedobjectcleanup.createwithcleanup.md)


</td><td>

`static`


</td><td>


</td></tr>
<tr><td>

[onFree()](./rc-js-util.sharedobjectcleanup.onfree.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[registerCleanup(sharedObject, cleanup, options)](./rc-js-util.sharedobjectcleanup.registercleanup.md)


</td><td>

`static`


</td><td>


</td></tr>
</tbody></table>
