Revert "Memory Leak: 95 MB"

This reverts commit cb54815cfc.
This commit is contained in:
Scott Giese 2020-08-09 09:39:04 -05:00
parent cb54815cfc
commit a93629a127
2 changed files with 4 additions and 4 deletions

View File

@ -973,10 +973,9 @@ SGPropertyNode::SGPropertyNode( const std::string& name,
*/ */
SGPropertyNode::~SGPropertyNode () SGPropertyNode::~SGPropertyNode ()
{ {
// REVIEW: Memory Leak: 95 MB // zero out all parent pointers, else they might be dangling
// 99,418,032 bytes in 654,066 blocks are still reachable in loss record 15,500 of 15,501 for (unsigned i = 0; i < _children.size(); ++i)
removeAllChildren(); _children[i]->_parent = 0;
clearValue(); clearValue();
if (_listeners) { if (_listeners) {

View File

@ -2045,6 +2045,7 @@ T SGPropertyNode::getValue(typename std::enable_if<!simgear::props
case STRING: case STRING:
case UNSPECIFIED: case UNSPECIFIED:
return simgear::parseString<T>(make_string()); return simgear::parseString<T>(make_string());
break;
default: // avoid compiler warning default: // avoid compiler warning
break; break;
} }