Merge pull request #8191 from jzhou77/fix-tuple
Make a new memory arena for Tuple::clear
This commit is contained in:
commit
1510124a33
|
@ -71,7 +71,9 @@ struct Tuple {
|
|||
size_t size() const { return offsets.size(); }
|
||||
void reserve(size_t cap) { offsets.reserve(cap); }
|
||||
void clear() {
|
||||
data.clear();
|
||||
// Make a new Standalone to use different memory so that
|
||||
// previously returned objects from pack() are valid.
|
||||
data = Standalone<VectorRef<uint8_t>>();
|
||||
offsets.clear();
|
||||
}
|
||||
// Return a Tuple encoded raw string.
|
||||
|
|
Loading…
Reference in New Issue