Prune unused nodes from trie

This commit is contained in:
topjohnwu
2021-10-09 02:15:03 -07:00
parent 2fef98a5af
commit 7f18616cc0
7 changed files with 54 additions and 15 deletions

View File

@@ -295,7 +295,7 @@ int SystemProperties::Add(const char* name, unsigned int namelen, const char* va
return 0;
}
int SystemProperties::Delete(const char *name) {
int SystemProperties::Delete(const char *name, bool trim_node) {
if (!initialized_) {
return -1;
}
@@ -311,7 +311,7 @@ int SystemProperties::Delete(const char *name) {
return -1;
}
bool ret = pa->rm(name);
bool ret = pa->rm(name, trim_node);
if (!ret) {
return -1;
}