Exemple #1
0
 /// <summary>
 /// Returns an item to the pool.
 /// <paramref name="item"/> the <see cref="PooledStringBuilder"/> being returned
 /// </summary>
 public void ReturnObject(PooledStringBuilder item)
 {
     // remove the lock
     locked[item.GetPoolIndex()] = false;
     // tell the item it's been returned to the pool
     item.ReturnToPool();
 }
Exemple #2
0
 /// <summary>
 /// Determines if an item is locked.
 /// <paramref name="item"/> the <see cref="PooledStringBuilder"/> instance
 /// <returns><c>true</c> if the asset is locked, false if it is free and ready for use</returns>
 /// </summary>
 public bool IsItemLocked(PooledStringBuilder item)
 {
     return(locked[item.GetPoolIndex()]);
 }
Exemple #3
0
 /// <summary>
 /// Unlocks the assets, readying it for use again.
 /// <paramref name="item"/> the <see cref="PooledStringBuilder"/> asset
 /// </summary>
 public void UnlockItem(PooledStringBuilder item)
 {
     locked[item.GetPoolIndex()] = false;
 }