We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have managed to contrive a reproduction.
We have an arbitrary synth buffer (50). Once that is full no more will be created
After 10 seconds, the remaining buffers (that didn't get disposed of) are logged to console. We expect zero, but we usually get over 30.
This is causing memory leaks in my real world app as synths are not cleaning up after themselves
https://codesandbox.io/p/sandbox/synth-onsilence-forked-xygrhy?workspaceId=6877f6b3-5e2a-423a-a4c1-5b098cab00e5
The text was updated successfully, but these errors were encountered:
for now, I am able to work around it by deducing note time, adding a slight buffer, and using setTimeout
setTimeout
synth.triggerAttackRelease(this.sounds.nextNote, '16n') const totalSynthTimeMS = (Tone.Time('16n').toSeconds() + 0.1) * 1000 setTimeout( ((s: Tone.FMSynth) => { this.synths.delete(synth) s.dispose() }).bind(this, synth), totalSynthTimeMS, )
But this might be harder to manage when I have lots of instrument types
Sorry, something went wrong.
No branches or pull requests
I have managed to contrive a reproduction.
We have an arbitrary synth buffer (50). Once that is full no more will be created
After 10 seconds, the remaining buffers (that didn't get disposed of) are logged to console. We expect zero, but we usually get over 30.
This is causing memory leaks in my real world app as synths are not cleaning up after themselves
https://codesandbox.io/p/sandbox/synth-onsilence-forked-xygrhy?workspaceId=6877f6b3-5e2a-423a-a4c1-5b098cab00e5
The text was updated successfully, but these errors were encountered: