Memory Leak in DrawingManager

Hello,
I’m using the AStar Package 5.1.1 and discovered a potential memory leak in the DrawingManager. Our cameras, we are using multiple cameras in a scene, do not get unloaded, when the player in our game is switching between the game and the main menu. I attached a screenshot from the source of the memory leak where 30 Cameras are leaking and all of them from the DrawingManager.

Can I somehow disable the drawing manager? Some of our render feature do net get unloaded and i want to check if this could be the source of it.

Best,
Johannes

Thanks!

I have implemented a fix, and it will be included in the next update.
In the meantime, if you want to clean things up, I think you should be able to call:

GameObject.Destroy(DrawingManager.instance.gameObject);

It should re-initialize itself when you try to draw anything next time.

1 Like