summaryrefslogtreecommitdiffstats
path: root/src/Dictionary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Dictionary.cpp')
-rw-r--r--src/Dictionary.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp
index 30c20b6..0a909e5 100644
--- a/src/Dictionary.cpp
+++ b/src/Dictionary.cpp
@@ -40,7 +40,7 @@ static void dictionary_fill(Dictionary *_this, std::map<std::string,Node*> &map,
plist_dict_next_item(node, it, &key, &subnode);
if (key && subnode)
map[std::string(key)] = Node::FromPlist(subnode, _this);
- delete key;
+ free(key);
} while (subnode);
free(it);
}
@@ -51,7 +51,7 @@ Dictionary::Dictionary(plist_t node, Node* parent) : Structure(parent)
dictionary_fill(this, _map, _node);
}
-Dictionary::Dictionary(const PList::Dictionary& d)
+Dictionary::Dictionary(const PList::Dictionary& d) : Structure(d.GetParent())
{
for (Dictionary::iterator it = _map.begin(); it != _map.end(); it++)
{
@@ -176,9 +176,9 @@ void Dictionary::Remove(Node* node)
plist_dict_get_item_key(node->GetPlist(), &key);
plist_dict_remove_item(_node, key);
std::string skey = key;
- delete key;
+ free(key);
_map.erase(skey);
- delete node;
+ free(node);
}
}