Show / Hide Table of Contents

Interface IObjectPoolAllocateFree<T>

Interface for object pools with "alloc" and "free" functions.

Namespace: System.Memory
Assembly: Nuqleon.Memory.dll
Syntax
public interface IObjectPoolAllocateFree<T>
    where T : class
Type Parameters
Name Description
T

Type of the elements stored in the pool.

Remarks

This interface can be used to restrict pool usage to the alloc/free pattern.

Methods

Allocate()

Returns an object instance and checks it out from the pool.

Declaration
T Allocate()
Returns
Type Description
T

Object instance returned from the pool.

Free(T)

Returns an object to the pool.

Declaration
void Free(T obj)
Parameters
Type Name Description
T obj

Object to return to the pool.

In This Article
Back to top Generated by DocFX