Skip to content

How do you properly cleanup AudioContext and AudioWorkletProcessor? (possible memory leak) #2

@svenoaks

Description

@svenoaks

If I try to close the AudioContext and make a new one, along with a new AudioNode, a memory leak happens - it looks like all the raw audio data from the last node is retained in the AudioNode.

See example with slightly modified example_timestretching at https://github.com/svenoaks/superpowered-js-memory-leak.git. Press Start button and let it do it's thing. You'll see the memory from a Google Chrome Helper (or FF equivalent) continually rise.

I can prevent this by never using a new AudioNode, but I think it would be better if I was able to release them properly and create new ones at will.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions