From e26cbccfe0a0d952699c22f9ac33d8d7da91dceb Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 11 Jan 2018 13:22:23 +0100 Subject: [PATCH] Reverted DisposableObject.cs to its original state --- src/Umbraco.Core/DisposableObject.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Core/DisposableObject.cs b/src/Umbraco.Core/DisposableObject.cs index 16c39e34d8..0a3ae1c782 100644 --- a/src/Umbraco.Core/DisposableObject.cs +++ b/src/Umbraco.Core/DisposableObject.cs @@ -21,8 +21,9 @@ namespace Umbraco.Core private readonly object _locko = new object(); // gets a value indicating whether this instance is disposed. - // for internal tests only (not thread safe) - internal bool Disposed { get { return _disposed; } } + // for internal tests only (not thread safe) + //TODO make this internal + rename "Disposed" when we can break compatibility + public bool IsDisposed { get { return _disposed; } } // implements IDisposable public void Dispose() @@ -32,12 +33,13 @@ namespace Umbraco.Core } // finalizer - ~DisposableObject() - { - Dispose(false); - } + ~DisposableObject() + { + Dispose(false); + } - private void Dispose(bool disposing) + //TODO make this private, non-virtual when we can break compatibility + protected virtual void Dispose(bool disposing) { lock (_locko) {