Free rocksdb iterators

This commit is contained in:
Thomas Krijnen
2025-09-01 14:32:13 +02:00
parent 01b64674ab
commit a831884ee6
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -463,7 +463,7 @@ void IfcParse::impl::rocks_db_file_storage::process_deletion_inverse(IfcUtil::If
{
// compute next prefix that does not start with v|{id}|
auto prefix = "v|" + std::to_string(id) + "|";
auto it = db->NewIterator(rocksdb::ReadOptions());
auto it = std::unique_ptr<rocksdb::Iterator>(db->NewIterator(rocksdb::ReadOptions()));
it->Seek(prefix);
while (it->Valid()) {
it->Next();
@@ -493,7 +493,7 @@ void IfcParse::impl::rocks_db_file_storage::process_deletion_inverse(IfcUtil::If
{
auto prefix = "v|" + std::to_string(name) + "|";
auto it = db->NewIterator(rocksdb::ReadOptions());
auto it = std::unique_ptr<rocksdb::Iterator>(db->NewIterator(rocksdb::ReadOptions()));
it->Seek(prefix);
while (it->Valid() && it->key().starts_with(prefix)) {
std::string s = it->value().ToString();