EngineSim objects are now pooled.
[VesselSimulator.git] / KerbalEngineer / VesselSimulator / PartSim.cs
blob:a/KerbalEngineer/VesselSimulator/PartSim.cs -> blob:b/KerbalEngineer/VesselSimulator/PartSim.cs
--- a/KerbalEngineer/VesselSimulator/PartSim.cs
+++ b/KerbalEngineer/VesselSimulator/PartSim.cs
@@ -196,7 +196,7 @@
 
                         Vector3 thrustvec = this.CalculateThrustVector(vectoredThrust ? engine.thrustTransforms : null, log);
 
-                        EngineSim engineSim = new EngineSim(this,
+                        EngineSim engineSim = EngineSim.GetPoolObject().Init(this,
                             atmosphere,
                             (float)mach,
                             engine.maxFuelFlow,
@@ -230,7 +230,7 @@
 
                         Vector3 thrustvec = this.CalculateThrustVector(vectoredThrust ? engine.thrustTransforms : null, log);
 
-                        EngineSim engineSim = new EngineSim(this,
+                        EngineSim engineSim = EngineSim.GetPoolObject().Init(this,
                             atmosphere,
                             (float)mach,
                             engine.maxFuelFlow,