Possible Memory Leak? Using Unity Memory Profiler using Astar4.2.11

Hi there, I’m getting a crash every time I try closing my game and when researching that I found out that it can be related to having memory leaks.

I added Unity’s Memory Profiler to the project and tried profiling back in the menu after having played through the game (So most things should have been removed from the memory)

There’s a ton of Pathfinding.Connection[] and Pathfinding.TriangleMeshNode in the memory even though at that point there isn’t even an AStar Pathfinding game object in the scene. Am I doing something wrong when changing scenes?

Screenshot of the memory profiler:

Hi

The package uses object pools for a lot of lists and arrays so that would account for the Connection[]. And I guess some TriangleMeshNodes could be references from those Connection structs…
I don’t think this should be an unbounded leak. It will use at most about as much memory as having a graph loaded. If you later load a graph it will get most of its memory from those pooled objects.
But maybe I should make sure to clear those Connection structs before pooling them…