Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit be644ba2 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

implemented IDisposable

parent b2c344a3
No related branches found
No related tags found
No related merge requests found
...@@ -187,7 +187,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -187,7 +187,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
public string RunSuffix; public string RunSuffix;
} }
internal class RunEntry : LoggingObject internal class RunEntry : LoggingObject, IDisposable
{ {
public IVectoRun Run; public IVectoRun Run;
public JobContainer JobContainer; public JobContainer JobContainer;
...@@ -244,6 +244,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -244,6 +244,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
ExecException = e.Error; ExecException = e.Error;
} }
} }
public void Dispose()
{
_worker.Dispose();
}
} }
} }
} }
\ No newline at end of file
...@@ -40,11 +40,10 @@ using TUGraz.VectoCore.Utils; ...@@ -40,11 +40,10 @@ using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
{ {
public class FuelConsumptionMap : SimulationComponentData public class FuelConsumptionMap : SimulationComponentData, IDisposable
{ {
[Required, ValidateObject] private readonly DelaunayMap _fuelMap = new DelaunayMap("FuelConsumptionMap"); [Required, ValidateObject] private readonly DelaunayMap _fuelMap = new DelaunayMap("FuelConsumptionMap");
private FuelConsumptionMap() {} private FuelConsumptionMap() {}
public static FuelConsumptionMap ReadFromFile(string fileName) public static FuelConsumptionMap ReadFromFile(string fileName)
...@@ -228,6 +227,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine ...@@ -228,6 +227,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
return _fuelMap != null ? _fuelMap.GetHashCode() : 0; return _fuelMap != null ? _fuelMap.GetHashCode() : 0;
} }
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
_fuelMap.Dispose();
}
#endregion #endregion
} }
} }
\ No newline at end of file
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/ */
using System;
using System.Data; using System.Data;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
...@@ -42,7 +43,7 @@ namespace TUGraz.VectoCore.OutputData ...@@ -42,7 +43,7 @@ namespace TUGraz.VectoCore.OutputData
/// <summary> /// <summary>
/// Class for the sum file in vecto. /// Class for the sum file in vecto.
/// </summary> /// </summary>
public class SummaryDataContainer : LoggingObject public class SummaryDataContainer : LoggingObject, IDisposable
{ {
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
private const string JOB = "Job [-]"; private const string JOB = "Job [-]";
...@@ -254,5 +255,17 @@ namespace TUGraz.VectoCore.OutputData ...@@ -254,5 +255,17 @@ namespace TUGraz.VectoCore.OutputData
{ {
return text.Replace('#', '_').Replace(',', '_').Replace('\n', '_').Replace('\r', '_'); return text.Replace('#', '_').Replace(',', '_').Replace('\n', '_').Replace('\r', '_');
} }
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
_table.Dispose();
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment