1
0
Fork 0

JSBSim sync (Fixed memory leaks)

This commit is contained in:
Bertrand Coconnier 2018-01-14 15:20:50 +01:00
parent aa9ad6a780
commit 9508ada1f1

View file

@ -86,6 +86,14 @@ FGTurbine::FGTurbine(FGFDMExec* exec, Element *el, int engine_number, struct Inp
FGTurbine::~FGTurbine()
{
// Delete those functions that have requested the construction of a FGSpoolUp
// instance. FGModelFunctions will manage the destruction of the other
// instances.
if (dynamic_cast<FGSpoolUp*>(N1SpoolUp)) delete N1SpoolUp;
if (dynamic_cast<FGSpoolUp*>(N1SpoolDown)) delete N1SpoolDown;
if (dynamic_cast<FGSpoolUp*>(N2SpoolUp)) delete N2SpoolUp;
if (dynamic_cast<FGSpoolUp*>(N2SpoolDown)) delete N2SpoolDown;
Debug(1);
}