Add RentedCount for ObjectPool.

This commit is contained in:
2023-02-11 23:09:05 +08:00
parent 9fd685b8b3
commit 42cb54de1d

View File

@@ -14,6 +14,10 @@
_objs = new T[capacity];
}
/// <summary>
/// The count of objects rented from the pool.
/// </summary>
public int RentedCount { get { return _index; } }
/// <summary>
/// Rents a object from the pool.
/// </summary>
/// <returns>The rented object.</returns>