1
0
Fork 0

Fixed some memory leaks. Thanks to Andreas Gaeb for reporting.

This commit is contained in:
Anders Gidenstam 2011-04-13 21:06:05 +02:00
parent 05a2eff317
commit 8513a057f3
3 changed files with 7 additions and 2 deletions

View file

@ -173,6 +173,8 @@ void FGCondition::InitializeConditionals(void)
FGCondition::~FGCondition(void) FGCondition::~FGCondition(void)
{ {
delete TestParam1;
delete TestParam2;
for (unsigned int i=0; i<conditions.size(); i++) delete conditions[i]; for (unsigned int i=0; i<conditions.size(); i++) delete conditions[i];
Debug(1); Debug(1);

View file

@ -199,6 +199,9 @@ FGFCSComponent::FGFCSComponent(FGFCS* _fcs, Element* element) : fcs(_fcs)
FGFCSComponent::~FGFCSComponent() FGFCSComponent::~FGFCSComponent()
{ {
Debug(1); Debug(1);
for (unsigned int i=0; i<InputNodes.size(); i++) {
delete InputNodes[i];
}
} }
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -38,7 +38,7 @@ INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGJSBBase.h" #include "FGJSBBase.h"
#include "math/FGParameter.h" #include "math/FGPropertyValue.h"
#include <string> #include <string>
#include <vector> #include <vector>
@ -111,7 +111,7 @@ protected:
std::vector <FGPropertyManager*> OutputNodes; std::vector <FGPropertyManager*> OutputNodes;
FGPropertyManager* ClipMinPropertyNode; FGPropertyManager* ClipMinPropertyNode;
FGPropertyManager* ClipMaxPropertyNode; FGPropertyManager* ClipMaxPropertyNode;
std::vector <FGParameter*> InputNodes; std::vector <FGPropertyValue*> InputNodes;
std::vector <std::string> InputNames; std::vector <std::string> InputNames;
std::vector <float> InputSigns; std::vector <float> InputSigns;
std::vector <double> output_array; std::vector <double> output_array;