Class DisposableObject
Abstract implementation of IDisposable.
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public abstract class DisposableObject : IDisposable
Remarks
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
IsDisposed
Declaration
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
DisposeResources()
Declaration
protected abstract void DisposeResources()
DisposeUnmanagedResources()
Declaration
protected virtual void DisposeUnmanagedResources()
Finalize()
Declaration
protected void Finalize()