diff options
author | 2025-03-01 23:56:06 +0100 | |
---|---|---|
committer | 2025-03-01 23:56:06 +0100 | |
commit | 5ea6de69afcf11f2d2e59258cb055a5b1fdb5f82 (patch) | |
tree | adf925cb6b61b5279c2ad3627b2fd7bc48b34300 /src/Dictionary.cpp | |
parent | d40f03e4090edafea75f04a1697ef0384231d333 (diff) | |
download | libplist-5ea6de69afcf11f2d2e59258cb055a5b1fdb5f82.tar.gz libplist-5ea6de69afcf11f2d2e59258cb055a5b1fdb5f82.tar.bz2 |
C++: Use `free()` instead of `delete` for C things
Diffstat (limited to 'src/Dictionary.cpp')
-rw-r--r-- | src/Dictionary.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp index 30c20b6..f5fd239 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); } @@ -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); } } |