I actually don't see why this could cause before a memory leak which gets resolved using the code below instead. `CTreeMahineNode::set_children(CDynamicObjectArray*)` does not `SG_REF` its argument.

I am not saying it is wrong, I just don't understand it. @mazumdarparijat, could you please motivate this change?