1
0
mirror of https://github.com/Kopano-dev/kopano-ol-extension.git synced 2023-10-10 13:37:40 +02:00

[KOE-109] Removed all current TraceExtra messages

This commit is contained in:
Patrick Simpson 2017-05-03 14:16:21 +02:00
parent 4bf4539bda
commit ebc4e807a9
3 changed files with 0 additions and 25 deletions

View File

@ -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;
}

View File

@ -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());
}
}
}
}
}

View File

@ -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();