rive-app / rive-wasm

Wasm/JS runtime for Rive
MIT License
703 stars 51 forks source link

Call delete on objects instanced from WASM. #269

Closed luigi-rosso closed 1 year ago

luigi-rosso commented 1 year ago

Not sure if we're using this anywhere beyond the examples, but in general whenever we new something from the rive WASM module, we'll need to explicitly delete it when we're done with it.

https://github.com/rive-app/rive-wasm/blob/f2a519d3e5e3bbaef857917067302b11c8373a6c/js/src/utils/registerTouchInteractions.js#L34-L36

We should be calling invertedMatrix.delete(); and canvasCoordinatesVector.delete(); at some point!

zplata commented 1 year ago

Addressed in https://github.com/rive-app/rive-wasm/pull/273