Allow multiple objects to be destroyed
Enhance the destroyObject action to take an array
rather than a single path.
Change-Id: Ic1de7274afc253042b590c71ca200618a6ff54d2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/manager.cpp b/manager.cpp
index 264037f..e100cd9 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -195,10 +195,14 @@
}
}
-void Manager::destroyObject(const char* path)
+void Manager::destroyObjects(
+ const std::vector<const char*>& paths)
{
- std::string p{path};
- _refs.erase(_root + p);
+ for (const auto& path : paths)
+ {
+ std::string p{path};
+ _refs.erase(_root + p);
+ }
}
details::holder::Base& Manager::getInterfaceHolder(