fix: Prepares for IPooledEnumerable removal (#1548)

### Summary

- Removes `IPooledEnumerable` (non-generic)
- Changes `IPooledEnumerable<T>` so that  `Free()` is replaced with the `IDisposable` pattern
This commit is contained in:
Kamron Batman 2023-10-15 11:20:49 -07:00 • committed by GitHub
parent c2d6578955
commit d57f1fecc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
92 changed files with 644 additions and 907 deletions

View file

@ -59,8 +59,6 @@ namespace Server.Commands.Generic
objs.Add(obj);
}
}
eable.Free();
ext.Filter(objs);
RunCommand(from, objs, command, args);

View file

@ -1141,14 +1141,11 @@ namespace Server.Commands
{
if (item.Z == z && item.ItemID == itemID)
{
eable.Free();
return true;
}
}
}
eable.Free();
while (m_DeleteQueue.Count > 0)
{
m_DeleteQueue.Dequeue().Delete();
@ -1211,8 +1208,6 @@ namespace Server.Commands
break;
}
}
eable.Free();
}
else if (item is MarkContainer markCont)
{

View file

@ -1137,14 +1137,11 @@ namespace Server.Commands
{
if (item.Z == z && item.ItemID == itemID)
{
eable.Free();
return true;
}
}
}
eable.Free();
while (m_DeleteQueue.Count > 0)
{
m_DeleteQueue.Dequeue()?.Delete();
@ -1197,8 +1194,6 @@ namespace Server.Commands
break;
}
}
eable.Free();
}
else if (item is MarkContainer markCont)
{

View file

@ -132,8 +132,6 @@ namespace Server.Commands
item.Delete();
}
}
eable.Free();
return count;
}

View file

@ -101,8 +101,6 @@ namespace Server.Commands
}
}
eable.Free();
while (m_ToDelete.Count > 0)
{
m_ToDelete.Dequeue().Delete();

View file

@ -97,8 +97,6 @@ namespace Server.Commands
}
}
eable.Free();
for (var i = 0; i < toDelete.Count; ++i)
{
toDelete[i].Delete();