fix memory leak in config::merge_children

remove unused function detach_children
This commit is contained in:
Patrick Parker 2007-02-24 04:55:58 +00:00
parent efff6c5c77
commit 70a0145bd1
2 changed files with 1 additions and 10 deletions

View File

@ -71,7 +71,7 @@ void config::merge_children(const std::string& key)
merged_children.append(**i);
}
detach_children(key);
clear_children(key);
add_child(key,merged_children);
}
@ -188,12 +188,6 @@ private:
}
void config::detach_children(const std::string& key)
{
ordered_children.erase(std::remove_if(ordered_children.begin(),ordered_children.end(),remove_ordered(key)),ordered_children.end());
children.erase(key);
}
void config::clear_children(const std::string& key)
{
ordered_children.erase(std::remove_if(ordered_children.begin(),ordered_children.end(),remove_ordered(key)),ordered_children.end());

View File

@ -151,9 +151,6 @@ public:
string_map values;
private:
//detach child nodes without deleting them (eg. for moving)
void detach_children(const std::string& key);
//a list of all children of this node.
child_map children;