Microsoft.Extensions.ObjectPool Default implementation of . The type to pool objects for. This implementation keeps a cache of retained objects. This means that if objects are returned when the pool has already reached "maximumRetained" objects they will be available to be Garbage Collected. Creates an instance of . The pooling policy to use. Creates an instance of . The pooling policy to use. The maximum number of objects to retain in the pool. The default . The maximum number of objects to retain in the pool. Represents a policy for managing pooled objects. The type of object which is being pooled. Create a . The which was created. Runs some processing when an object was returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool. The object to return to the pool. true if the object should be returned to the pool. false if it's not possible/desirable for the pool to keep the object. A pool of objects. The type of objects to pool. Gets an object from the pool if one is available, otherwise creates one. A . Return an object to the pool. The object to add to the pool. Methods for creating instances. A provider of instances. Creates an . The type to create a pool for. Creates an with the given . The type to create a pool for.