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]; _objs = new T[capacity];
} }
/// <summary> /// <summary>
/// The count of objects rented from the pool.
/// </summary>
public int RentedCount { get { return _index; } }
/// <summary>
/// Rents a object from the pool. /// Rents a object from the pool.
/// </summary> /// </summary>
/// <returns>The rented object.</returns> /// <returns>The rented object.</returns>