Open joncardasis opened 2 months ago
Also to note that https://rive.app/community/doc/low-level-api-usage/doctAfBY6v3P#cleaning-up-instances outlines deleting resources manually, however, renderer.delete();
also throws an error where delete
is not a function on the webgl2 renderer.
renderer.delete(); // Error – renderer.delete is not a function
file.delete();
artboard.delete();
animation.delete();
stateMachine.delete();
Description
The
@rive-app/webgl2-advanced@2.20.0
renderer (and other webgl renderers) exposes acleanup
function in.d.ts
but errors when called:'rive.cleanup' is not a function
. See Repro section for an example usage.It appears as though the
wasm/js/*renderer.js
files do not set aModule["cleanup"]
function.console.log(Object.keys(rive))
does not contain any reference ofcleanup
.This inability to cleanup the wasm allocations leads to memory leaks.
Provide a Repro