JSBSim sync (Fixed memory leaks)
This commit is contained in:
parent
aa9ad6a780
commit
9508ada1f1
1 changed files with 8 additions and 0 deletions
|
@ -86,6 +86,14 @@ FGTurbine::FGTurbine(FGFDMExec* exec, Element *el, int engine_number, struct Inp
|
||||||
|
|
||||||
FGTurbine::~FGTurbine()
|
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);
|
Debug(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue