I’m actually not sure what setLocalThreadPhysicsSpace() does
Here’s the source code:
I assume the original idea was to support server-side applications that simulate multiple physics spaces in parallel, each space having its own thread.
When a space is created, a strong reference is stored in thread-local data. The JVM can’t reclaim the space until the reference is cleared.