js-util

Home > rc-js-util > RawVoidPointer

RawVoidPointer class

Provides a reference counted wrapper to a pointer malloc‘d from JS and is free‘d on reference count hitting 0.

Signature:

export declare class RawVoidPointer implements IRawVoidPointer, IDebugAllocateListener 

Implements: IRawVoidPointer, IDebugAllocateListener

Constructors

Constructor Modifiers Description
(constructor)(wrapper, pointer, byteSize)   Constructs a new instance of the RawVoidPointer class

Properties

Property Modifiers Type Description
byteSize   number  
debugOnAllocate?   (() => void) (Optional)
onMemoryResize   () => void  
pointer   number  
sharedObject   IReferenceCountedPtr  

Methods

Method Modifiers Description
createOne(wrapper, byteSize) static  
createOne(wrapper, byteSize, allocationFailThrows) static  
getDataView()