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:
parent
4bf4539bda
commit
ebc4e807a9
@ -41,7 +41,6 @@ namespace Acacia.Stubs.OutlookWrappers
|
|||||||
IBase wrapper = CreateWrapper(o, mustRelease);
|
IBase wrapper = CreateWrapper(o, mustRelease);
|
||||||
if (wrapper != null)
|
if (wrapper != null)
|
||||||
wrapper.MustRelease = mustRelease;
|
wrapper.MustRelease = mustRelease;
|
||||||
ComRelease.LogWrapper(o, wrapper);
|
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,30 +74,7 @@ namespace Acacia.Utils
|
|||||||
if (o == null || !Marshal.IsComObject(o))
|
if (o == null || !Marshal.IsComObject(o))
|
||||||
return;
|
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);
|
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,6 @@ namespace Acacia.Utils
|
|||||||
else
|
else
|
||||||
++typeCounts[GetType()];
|
++typeCounts[GetType()];
|
||||||
|
|
||||||
Logger.Instance.TraceExtra(this, "Disposing wrapper: {0}", new System.Diagnostics.StackTrace());
|
|
||||||
_isDisposed = true;
|
_isDisposed = true;
|
||||||
Interlocked.Increment(ref Statistics.DisposedWrappers);
|
Interlocked.Increment(ref Statistics.DisposedWrappers);
|
||||||
DoRelease();
|
DoRelease();
|
||||||
|
Loading…
Reference in New Issue
Block a user