From ebc4e807a969535b1861d2be034850d0da10dcfb Mon Sep 17 00:00:00 2001 From: Patrick Simpson Date: Wed, 3 May 2017 14:16:21 +0200 Subject: [PATCH] [KOE-109] Removed all current TraceExtra messages --- .../Stubs/OutlookWrappers/Mapping.cs | 1 - .../AcaciaZPushPlugin/Utils/ComRelease.cs | 23 ------------------- .../Utils/DisposableWrapper.cs | 1 - 3 files changed, 25 deletions(-) diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Stubs/OutlookWrappers/Mapping.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Stubs/OutlookWrappers/Mapping.cs index 8596828..cc2542c 100644 --- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Stubs/OutlookWrappers/Mapping.cs +++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Stubs/OutlookWrappers/Mapping.cs @@ -41,7 +41,6 @@ namespace Acacia.Stubs.OutlookWrappers IBase wrapper = CreateWrapper(o, mustRelease); if (wrapper != null) wrapper.MustRelease = mustRelease; - ComRelease.LogWrapper(o, wrapper); return wrapper; } diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/ComRelease.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/ComRelease.cs index 4b1f0d2..e6a80a9 100644 --- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/ComRelease.cs +++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/ComRelease.cs @@ -74,30 +74,7 @@ namespace Acacia.Utils if (o == null || !Marshal.IsComObject(o)) return; - if (Logger.Instance.IsLevelEnabled(LogLevel.TraceExtra)) - { - Logger.Instance.TraceExtra(typeof(ComRelease), "Releasing object: {0:X} @ {1}", GetObjAddress(o), - new System.Diagnostics.StackTrace()); - } Marshal.ReleaseComObject(o); } - - private static long GetObjAddress(object o) - { - // It seems to be impossible to get an actual address, and the objects get moved around fairly frequently - return o.GetHashCode(); - } - - public static void LogWrapper(object o, IBase wrapper) - { - if (Logger.Instance.IsLevelEnabled(LogLevel.TraceExtra)) - { - if (wrapper != null) - { - Logger.Instance.TraceExtra(typeof(ComRelease), "Wrapping object: {0:X} @ {1}", GetObjAddress(o), - new System.Diagnostics.StackTrace()); - } - } - } } } diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/DisposableWrapper.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/DisposableWrapper.cs index 2fe307b..b7cefcf 100644 --- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/DisposableWrapper.cs +++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Utils/DisposableWrapper.cs @@ -61,7 +61,6 @@ namespace Acacia.Utils else ++typeCounts[GetType()]; - Logger.Instance.TraceExtra(this, "Disposing wrapper: {0}", new System.Diagnostics.StackTrace()); _isDisposed = true; Interlocked.Increment(ref Statistics.DisposedWrappers); DoRelease();