Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Resource leak patch #526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Sources/Sandbox.Game/Engine/Voxels/MyVoxelGeometry.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@

using Sandbox.Common;
using Sandbox.Engine.Physics;
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using VRage;
using VRage.Collections;
using VRage;
using VRage.Utils;
using VRage.Voxels;
using VRageMath;
Expand All @@ -18,7 +13,7 @@

namespace Sandbox.Engine.Voxels
{
public partial class MyVoxelGeometry
public partial class MyVoxelGeometry : IDisposable
{
private static List<Vector3I> m_sweepResultCache = new List<Vector3I>();
private static List<int> m_overlapElementCache = new List<int>();
Expand Down Expand Up @@ -446,5 +441,10 @@ private void SetEmpty(ref MyCellCoord cell, bool value)

Debug.Assert(IsEmpty(ref cell) == value);
}

public void Dispose()
{
m_lock.Dispose();
}
}
}