1
0
Fork 0

Fix bug #204, and help with bug #222 - delete all

properties under /fdm/jsbsim when deleting the JSBSim interface.
This commit is contained in:
James Turner 2010-12-29 22:46:35 +00:00
parent 6618a7bc5f
commit 6fd33dd2c3

View file

@ -298,6 +298,13 @@ FGJSBsim::FGJSBsim( double dt )
FGJSBsim::~FGJSBsim(void)
{
delete fdmex;
SGPropertyNode_ptr jsbsimRoot = fgGetNode("/fdm/jsbsim");
if (jsbsimRoot) {
SGPropertyNode* fdm = jsbsimRoot->getParent();
fdm->removeChild("jsbsim", 0, false);
}
// properties are deleted when the sharedPtr above goes away
}
/******************************************************************************/