Skip to content

Memory leak caused by resetting environment. #6

@ghost

Description

It appears that every time the environment is restarted an additional 4 MB of memory is allocated without cleaning up the previous simulation.
image

Here's a snapshot of memory usage for the tab itself to demonstrate how easy it is to end up with GBs being allocated when restarting the environment a few times.
image

Due to the fact that fixing the leak itself may not be an option due to it being a problem with WebGL I theorize that a somewhat hacky fix is to rewrite Utils.generateState() by using the same logic the brush uses to clear the environment and to place the cells using that to recreate the same effect without having to make a whole new buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions