bevy_tilemap
bevy_tilemap copied to clipboard
memory leak when updating tiles?
Bevy Tilemap version 0.4
Operating system & version MacOS 11.3
What you did
tried to update tiles using Tilemap.get_tile_mut(..)
What you expected to happen expected the memory usage to remain flat (~80 MB)
What actually happened memory usage slowly grows and grows (2 GB and counting), visually looks correct.
Additional information if i comment out the single line of code that does the modification, the memory issue goes away.
Huh, thats interesting. I hadn't noticed that on my end but clearly, it appears to keep grabbing the tile mutably ... ? Should be only updating the one memory position. Shouldn't be making copies of it without dropping it, as per how Rust typically works. Do you have a more specific use case that could possible be doing something odd?
I can confirm the memory leak on tile update. Haven't found a solution yet but still looking.
Turns out it is related to this: https://github.com/bevyengine/bevy/issues/2439