Skip to main content

DisposableTracker

Tracks created System.IDisposable objects. Used by ServiceStack.RequestContext to track Funq.Container created IDisposable instances. These instances are tracked and disposed at the end of a request.

Assembly: ServiceStack.dll​
View Source​
Declaration
[Serializable]
public class DisposableTracker : IDisposable

Fields​

HashId​

View Source​
Declaration
public const string HashId = "__disposables"

Methods​

Add(IDisposable)​

Adds disposable to the tracker

View Source​
Declaration
public void Add(IDisposable instance)
Parameters​
TypeName
System.IDisposableinstance

Dispose()​

Dispose all disposables in the tracker. If disposable is still alive also ServiceStack.HostContext.Release() is called to release the object.

View Source​
Declaration
public void Dispose()

Implements​

  • System.IDisposable