Skip to content

Commit

Permalink
Fix reference counting on python strings
Browse files Browse the repository at this point in the history
  • Loading branch information
willdealtry authored and IvoDD committed Nov 13, 2024
1 parent b0dad96 commit c8cc666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/arcticdb/python/python_strings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class DynamicStringReducer {
}

allocated.try_emplace(offset, obj);
for (auto c = 0U; c < count; ++c)
for (auto c = 1U; c < count; ++c)
inc_ref(obj);
}
}
Expand All @@ -202,7 +202,7 @@ class DynamicStringReducer {
for (const auto &[offset, count] : unique_counts) {
const auto sv = get_string_from_pool(offset, string_pool);
auto obj = StringCreator::create(sv, has_type_conversion);
for (auto c = 0U; c < count; ++c)
for (auto c = 1U; c < count; ++c)
inc_ref(obj);

py_strings.insert(std::make_pair(offset, obj));
Expand Down

0 comments on commit c8cc666

Please sign in to comment.