Skip to content

PooledResource<T>

class

Namespace: Orleans.Providers.Streams.Common

Utility class to support pooled objects by allowing them to track the pool they came from and return to it when disposed
public abstract class PooledResource<T> : IDisposable
where T : Orleans.Providers.Streams.Common.PooledResource<T>, System.IDisposable

Properties

  • Pool Gets the pool to return this resource to upon disposal. A pool must set this property upon resource allocation.

Methods

  • Dispose Returns item to pool.
  • OnResetState Notifies the object that it has been purged, so it can reset itself to the state of a newly allocated object.
  • SignalPurge If this object is to be used in a fixed size object pool, this call should be overridden with the purge implementation that returns the object to the pool.