will not last long, the array is not referenced anywhere so will be freed soon, assign it to some variable. The E.getAddressOf just gives memory address, it does not care about allocation.
Fanoush probably has a point here, regarding the temporary array getting cleaned up in garbage collection.
Instead I have used a global auxiliary Uint32Array large enough to be in a flat memory area for passing in additional parameters. Not very elegant but works...
© Espruino, powered by microcosm.
Report a problem