js-util

Home > rc-js-util > SharedArray

SharedArray class

Typed array shared between wasm and javascript.

Signature:

export declare class SharedArray<TCtor extends TTypedArrayCtor> implements ISharedArray<TCtor>, IOnMemoryResize, IDebugAllocateListener 

Implements: ISharedArray<TCtor>, IOnMemoryResize, IDebugAllocateListener

Constructors

Constructor Modifiers Description
(constructor)(cMethodPrefix, ctor, wrapper, length, pointer)   Constructs a new instance of the SharedArray class

Properties

Property Modifiers Type Description
ctor   TCtor  
debugOnAllocate?   (() => void) (Optional)
elementByteSize   number  
length   number  
onMemoryResize   () => void  
sharedObject   IReferenceCountedPtr  

Methods

Method Modifiers Description
createOneF32(wrapper, length, clearMemory) static  
createOneF32(wrapper, length, clearMemory, allocationFailThrows) static  
createOneF64(wrapper, length, clearMemory) static  
createOneF64(wrapper, length, clearMemory, allocationFailThrows) static  
getInstance()