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:
parent
c2d6578955
commit
d57f1fecc1
92 changed files with 644 additions and 907 deletions
|
|
@ -1526,8 +1526,6 @@ namespace Server.Multis
|
|||
newComponents.Tiles[x][y].Length == 0 || Contains(item);
|
||||
}
|
||||
);
|
||||
|
||||
eable.Free();
|
||||
return canFit;
|
||||
}
|
||||
|
||||
|
|
@ -1905,7 +1903,7 @@ namespace Server.Multis
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Dispose()
|
||||
{
|
||||
_entities?.Free();
|
||||
_entities?.Dispose();
|
||||
_enumerator?.Dispose();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,13 +237,10 @@ namespace Server.Items
|
|||
{
|
||||
if (obj == this)
|
||||
{
|
||||
eable.Free();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -770,8 +770,6 @@ namespace Server.Multis
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public List<Mobile> AvailableVendorsFor(Mobile m) =>
|
||||
|
|
@ -1157,8 +1155,6 @@ namespace Server.Multis
|
|||
var eable = Map.GetItemsInBounds(rect);
|
||||
var list = eable.Where(item => item.Movable && IsInside(item)).ToList();
|
||||
|
||||
eable.Free();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -3661,7 +3657,6 @@ namespace Server.Multis
|
|||
map.GetItemsInBounds<Guildstone>(new Rectangle2D(X + mcl.Min.X, Y + mcl.Min.Y, mcl.Width, mcl.Height));
|
||||
|
||||
var item = eable.FirstOrDefault(Contains);
|
||||
eable.Free();
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ namespace Server.Multis
|
|||
}
|
||||
}
|
||||
|
||||
var _sectors = new List<Sector>();
|
||||
var _sectors = new List<Map.Sector>();
|
||||
var _houses = new List<BaseHouse>();
|
||||
|
||||
for (var i = 0; i < yard.Count; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue