2021-May-11 - Prerelease - 2.6.170
Pre-release
Pre-release
Fix memory leak caused by retained TripleAFrames. (#9213)
I noticed my TripleA was taking a lot of memory and took a heap
dump with JVisualVM. Most of the memory was byte arrays which
were backing Tiles in TileManager. But tracing their referenced,
I noticed I had lots of different TripleAframe instances around,
from games that were closed.
Turns out these were leaking. There were two problems:
- TripleAframe wasn't being disposed on close.
- ProMetricsUtils held a static that ended up with an eventual
transitive reference to TripleAFrame.
Fixing both of these made the TripleAFrame instance disappear
from the heap dump once a game was closed. I'm simply removing
the ProMetricsUtils class since it was just being used for some
debug logging.