Major upgrade

This commit is contained in:
Duc
2025-10-24 15:18:11 -07:00
parent fd85735c93
commit ce583d1664
478 changed files with 237518 additions and 47610 deletions

View File

@@ -26,7 +26,7 @@ namespace Raytheon.Common
/// those which were removed. A typical use of this is to AddData(), then use CheckOutStartOfData()/CheckInStartOfData to get
/// a pointer to the data and the amount of bytes that the pointer points to.
/// </summary>
public class DataBuffer: IDisposable
public class DataBuffer : IDisposable
{
#region PrivateClassMembers
private unsafe byte[] _buffer;
@@ -220,25 +220,11 @@ namespace Raytheon.Common
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly")]
public void Dispose()
{
try
lock (_syncObj)
{
lock (_syncObj)
{
Dispose(true);
Dispose(true);
GC.SuppressFinalize(this);
}
}
catch (Exception err)
{
try
{
ErrorLogger.Instance().Write(err.Message + "\r\n" + err.StackTrace);
}
catch (Exception)
{
//Do not rethrow. Exception from error logger that has already been garbage collected
}
GC.SuppressFinalize(this);
}
}
@@ -300,23 +286,9 @@ namespace Raytheon.Common
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
try
if (disposing)
{
if (disposing)
{
_pinnedArray.Free();
}
}
catch (Exception err)
{
try
{
ErrorLogger.Instance().Write(err.Message + "\r\n" + err.StackTrace);
}
catch (Exception)
{
//Do not rethrow. Exception from error logger that has already been garbage collected
}
_pinnedArray.Free();
}
}
#endregion