parent
25cad453f4
commit
f8b525f02d
|
|
@ -16,10 +16,10 @@ namespace Microsoft.Extensions.ObjectPool
|
||||||
T Create();
|
T Create();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Put an object in the pool.
|
/// Return an object to the pool.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="obj">The object to put in the pool.</param>
|
/// <param name="obj">The object to return to the pool.</param>
|
||||||
/// <returns><code>true</code> if put in the pool.</returns>
|
/// <returns><code>true</code> if returned to the pool.</returns>
|
||||||
bool Return(T obj);
|
bool Return(T obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ namespace Microsoft.Extensions.ObjectPool
|
||||||
public abstract class ObjectPool<T> where T : class
|
public abstract class ObjectPool<T> where T : class
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an object from the pool is one is available, otherwise creates one.
|
/// Gets an object from the pool if one is available, otherwise creates one.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <typeparamref name="T"/>.</returns>
|
/// <returns>A <typeparamref name="T"/>.</returns>
|
||||||
public abstract T Get();
|
public abstract T Get();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Put an object in the pool.
|
/// Return an object to the pool.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="obj">The object to add to the pool.</param>
|
/// <param name="obj">The object to add to the pool.</param>
|
||||||
public abstract void Return(T obj);
|
public abstract void Return(T obj);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue