Class DisposableObjectSlim
Abstract implementation of managed IDisposable.
Inheritance
System.Object
Namespace: Umbraco.Core
Assembly: Umbraco.Core.dll
Syntax
public abstract class DisposableObjectSlim : IDisposable
Remarks
This is for objects that do NOT have unmanaged resources. Use
Can also be used as a pattern for when inheriting is not possible.
See also: https://msdn.microsoft.com/en-us/library/b1yfkh5e%28v=vs.110%29.aspx See also: https://lostechies.com/chrispatterson/2012/11/29/idisposable-done-right/
Note: if an object's ctor throws, it will never be disposed, and so if that ctor has allocated disposable objects, it should take care of disposing them.
Properties
View SourceDisposed
Declaration
public bool Disposed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
View SourceDispose()
Declaration
public void Dispose()
DisposeResources()
Declaration
protected virtual void DisposeResources()