From 8b3d4440ae77eb8b0b59ff6b563675f159866fa9 Mon Sep 17 00:00:00 2001 From: arthurkehrwald <50906979+arthurkehrwald@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:56:08 +0100 Subject: [PATCH] Fix memory leak when rebuilding meshes --- .../VisualPinball.Unity/VPT/ColliderComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VisualPinball.Unity/VisualPinball.Unity/VPT/ColliderComponent.cs b/VisualPinball.Unity/VisualPinball.Unity/VPT/ColliderComponent.cs index a9f0f0825..6136a0ca7 100644 --- a/VisualPinball.Unity/VisualPinball.Unity/VPT/ColliderComponent.cs +++ b/VisualPinball.Unity/VisualPinball.Unity/VPT/ColliderComponent.cs @@ -156,8 +156,8 @@ private void OnDrawGizmos() } else { var api = InstantiateColliderApi(player, null); - var colliders = new ColliderReference(Allocator.TempJob); - var kinematicColliders = new ColliderReference(Allocator.TempJob, true); + var colliders = new ColliderReference(Allocator.Temp); + var kinematicColliders = new ColliderReference(Allocator.Temp, true); try { api.CreateColliders(ref colliders, ref kinematicColliders, 0.1f);