I’ve been tinkering with LibGDX on and off for a few months. I’m to a point where I have a procedurally generated infinite world done with Tiled maps and tele porters on each edge. When teleporting it asks the server for the next map and the information is taken from a SQL database and sent as a string to the client to load as a TiledMap. I also have a basic inventory system using scene2d and TableLayout. My problem is that when moving maps 200kb per teleport is never released from memory. When opening the inventory about 5MB is used, which is okay, but is never released from system memory. (What I’m calling system memory is what the OSX Activity Monitor is reporting.) When I did a heap dump with jmap and loaded it into the Eclipse Memory Analysis tool it is showing that the application has only used 2.9MB memory. I’m new to profilers and I have only ever coded web-apps and data integration services where things like this weren’t a problem. Am I doing something wrong? Is OSX lying (it does the same thing in Windows and Ubuntu as well)? I’ve been fighting this issue for a couple of months, and I would appreciate any insight anyone may have. Thank you for your time
Note: If any code is required and someone is willing to look at it for debugging, I’ll gladly provide the full source code.