tag
#instrumentation
2 items (2 fixes)
fixes
✓ 26.07.22
"Editor vsync hides physics cost: time the step directly"
Frame fps pins at 60 in the editor regardless of physics load: implement IScenePhysicsEvents.PrePhysicsStep/PostPhysicsStep with a Stopwatch to get the true, vsync-free CPU cost of the solver step.
performancephysics
✓ 26.07.22
"GameObject.Destroy() is deferred: a destroyed object still holds its exclusive claims for the rest of the frame"
GameObject.Destroy() is deferred to the end of the frame, so an object you just destroyed still exists, still answers, and still holds any exclusive claim it owns (IsMainCamera, a singleton slot, a registry entry) for the rest of that frame. Clear exclusive claims on the outgoing owner BEFORE calling Destroy, and never read a leak census in the same frame as the teardown it checks.
lifecycledestroy