Skip to content

[VariableBlockVector] Use std::vector for memory management

The manual memory management used before looks a bit scary and also leads to lots of repeated code. In this MR, both the actual vector entries and the vector windows are now held in std::vectors.

When @joe did something similar for the normal BlockVector, he used scope guards in some cases to call syncBaseArray(). I failed, however, to fully understand when/why they would be necessary.

By coincident, this MR also patches a bug in the VariableBlockVector. When copying from another vector, the copied-to vector would always have the state initialized = true, independent of the actual state of the copied-from vector. For an uninitialized source, this would give you a vector that is flagged initialized but is actually not.

Merge request reports