The camera creates a native Bullet ray-result callback once and never disposes it. In FocusKingdomCamera:
private ClosestRayResultCallback hitCallback;
...
hitCallback = new ClosestRayResultCallback(new Vector3(), new Vector3());
ClosestRayResultCallback is a JNI/native Bullet object, same category as the bodies and shapes we're careful to dispose everywhere else. But there's no dispose() in this class at all, so when the scene/camera goes away, this native object leaks. It's one per camera so it's not huge, but it's exactly the kind of native leak the project rule about "Bullet objects need explicit dispose in reverse creation order" is meant to catch.
The camera needs a dispose() that calls hitCallback.dispose(), and the scene teardown should call it.
File: core/src/com/focus/kingdom/graphics/camera/FocusKingdomCamera.java, around line 71 and 97 (creation); no matching dispose anywhere in the file.
The camera creates a native Bullet ray-result callback once and never disposes it. In FocusKingdomCamera:
ClosestRayResultCallbackis a JNI/native Bullet object, same category as the bodies and shapes we're careful to dispose everywhere else. But there's no dispose() in this class at all, so when the scene/camera goes away, this native object leaks. It's one per camera so it's not huge, but it's exactly the kind of native leak the project rule about "Bullet objects need explicit dispose in reverse creation order" is meant to catch.The camera needs a dispose() that calls
hitCallback.dispose(), and the scene teardown should call it.File:
core/src/com/focus/kingdom/graphics/camera/FocusKingdomCamera.java, around line 71 and 97 (creation); no matching dispose anywhere in the file.