diff --git a/src/JitterTests/AddRemoveTests.cs b/src/JitterTests/AddRemoveTests.cs index 6e066ca8..73c17af1 100644 --- a/src/JitterTests/AddRemoveTests.cs +++ b/src/JitterTests/AddRemoveTests.cs @@ -10,6 +10,12 @@ public void Setup() world = new World(); } + [TearDown] + public void TearDown() + { + world.Dispose(); + } + private class FilterOut(IDynamicTreeProxy shape) : IBroadPhaseFilter { public bool Filter(IDynamicTreeProxy shapeA, IDynamicTreeProxy shapeB) diff --git a/src/JitterTests/ConstraintTests.cs b/src/JitterTests/ConstraintTests.cs index ad12ed4b..225d9dd8 100644 --- a/src/JitterTests/ConstraintTests.cs +++ b/src/JitterTests/ConstraintTests.cs @@ -13,7 +13,7 @@ public void Setup() [TestCase] public void TestSizes() { - World world = new World(); + using World world = new World(); RigidBody b0 = world.CreateRigidBody(); RigidBody b1 = world.CreateRigidBody(); diff --git a/src/JitterTests/StackingTests.cs b/src/JitterTests/StackingTests.cs index b517f096..d981546b 100644 --- a/src/JitterTests/StackingTests.cs +++ b/src/JitterTests/StackingTests.cs @@ -13,6 +13,12 @@ public void Setup() }; } + [TearDown] + public void TearDown() + { + world.Dispose(); + } + [TestCase(true)] [TestCase(false)] public void SimpleStack(bool fullEPA)