Skip to content

Debug Visualizer Causes Memory Leak #70

@JustinLivi

Description

@JustinLivi

I haven't had time to fully investigate the underlying reason for this, but using the debug visualizations appears to cause a memory leak.

I followed the instructions in the wiki and saw all of my instances of FSM stick around in memory over multiple starts and stops. It looks like maybe it has to do with the AnimationController maintaining persistent references across executions, but I haven't fully investigated.

I tried manually cleaning up the AnimationController through unloading but it doesn't seem to have any effect. The only way I've been able to avoid the leak is by fully removing all of the debug code and references.

I should be able to provide a minimal reproducing example if desired, but just installing the Unity MemoryProfiler and examining the instances of FSMs between executions should be sufficient - for me I always see most of my initial instance IDs hanging around plus some new friends.

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