]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed some memory leaks. Thanks to Andreas Gaeb for reporting.
authorAnders Gidenstam <anders@gidenstam.org>
Wed, 13 Apr 2011 19:06:05 +0000 (21:06 +0200)
committerAnders Gidenstam <anders@gidenstam.org>
Wed, 13 Apr 2011 19:06:54 +0000 (21:06 +0200)
src/FDM/JSBSim/math/FGCondition.cpp
src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp
src/FDM/JSBSim/models/flight_control/FGFCSComponent.h

index 7f7e9057eb99b6e8a87fb8c50f43dd435c1c1cee..719a3e79d392c43f6383eeff23243f089c8a3a08 100644 (file)
@@ -173,6 +173,8 @@ void FGCondition::InitializeConditionals(void)
 
 FGCondition::~FGCondition(void)
 {
+  delete TestParam1;
+  delete TestParam2;
   for (unsigned int i=0; i<conditions.size(); i++) delete conditions[i];
 
   Debug(1);
index 4ea969774b6dbaef83a011d1af832abd5b773efd..64a7649270ee1a8cb56fe42a35ac36d8a681e74b 100644 (file)
@@ -199,6 +199,9 @@ FGFCSComponent::FGFCSComponent(FGFCS* _fcs, Element* element) : fcs(_fcs)
 FGFCSComponent::~FGFCSComponent()
 {
   Debug(1);
+  for (unsigned int i=0; i<InputNodes.size(); i++) {
+    delete InputNodes[i];
+  }
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
index 7ad58de0a00873a44dc1165344f6c47bbf7750b2..02bca98bd706a31df2d083a9a5f35e88b9146597 100644 (file)
@@ -38,7 +38,7 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGJSBBase.h"
-#include "math/FGParameter.h"
+#include "math/FGPropertyValue.h"
 #include <string>
 #include <vector>
 
@@ -111,7 +111,7 @@ protected:
   std::vector <FGPropertyManager*> OutputNodes;
   FGPropertyManager* ClipMinPropertyNode;
   FGPropertyManager* ClipMaxPropertyNode;
-  std::vector <FGParameter*> InputNodes;
+  std::vector <FGPropertyValue*> InputNodes;
   std::vector <std::string> InputNames;
   std::vector <float> InputSigns;
   std::vector <double> output_array;