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.

205 lines (91 loc) 2.41 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [SharedMemoryBlock](./rc-js-util.sharedmemoryblock.md) ## SharedMemoryBlock class Provides a reference counted wrapper to a pointer `malloc`<!-- -->'d from JS and is `free`<!-- -->'d on reference count hitting 0. **Signature:** ```typescript export declare class SharedMemoryBlock implements ISharedMemoryBlock ``` **Implements:** [ISharedMemoryBlock](./rc-js-util.isharedmemoryblock.md) ## Constructors <table><thead><tr><th> Constructor </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [(constructor)(wrapper, owner, pointer, byteSize)](./rc-js-util.sharedmemoryblock._constructor_.md) </td><td> `protected` </td><td> Constructs a new instance of the `SharedMemoryBlock` 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> [byteSize](./rc-js-util.sharedmemoryblock.bytesize.md) </td><td> `readonly` </td><td> number </td><td> </td></tr> <tr><td> [pointer](./rc-js-util.sharedmemoryblock.pointer.md) </td><td> `readonly` </td><td> number </td><td> </td></tr> <tr><td> [resourceHandle](./rc-js-util.sharedmemoryblock.resourcehandle.md) </td><td> `readonly` </td><td> [IManagedResourceNode](./rc-js-util.imanagedresourcenode.md) </td><td> </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [createOne(wrapper, bindToReference, byteSize)](./rc-js-util.sharedmemoryblock.createone.md) </td><td> `static` </td><td> </td></tr> <tr><td> [createOne(wrapper, bindToReference, byteSize, allocationFailThrows)](./rc-js-util.sharedmemoryblock.createone_1.md) </td><td> `static` </td><td> </td></tr> <tr><td> [getDataView()](./rc-js-util.sharedmemoryblock.getdataview.md) </td><td> </td><td> </td></tr> <tr><td> [getWrapper()](./rc-js-util.sharedmemoryblock.getwrapper.md) </td><td> </td><td> </td></tr> </tbody></table>