Using Libgdx features to avoid garbage collection