What happens, i have a text displaying the current fps, (always 2-3 digits), however I see a large amount of buffers being generated and trashed after a few seconds (up to 4 per frame wich quickly raise to a few thousand per second). (good that the fix for the tracking is in)
I investigated:
The assemble method generates a mesh with all letters in it.
When the buffer is not large enough a larger fitting one is created (like if the text gets more letters)
The problem here lies in the way the buffer.remaining() works.
Example Output from modificated ensureLargeEnough at bottom of post
solution:
Sequence of problem:
2 letter text, allocated first time buffer for two letters, everything fine limit set for two letters
text increases to three letters, larger buffer is allocated, limit set for three letters, still fine
text is 2 letters again, old buffer large enough, limit set for two letters
----
text increases again, three letters, however limit was set to two letters, so remaining returns not enough space, a new buffer the same size as the current is created!
This leads to a overloaded gc, wich creates unneccessary out of direct memory crashes, since it is occupied with collection the leaking buffers.