hi Rares -- since AddColumn appends to the data in the existing batch, all of the Buffer shared_ptrs that were there before should persist after the operation. So no memory should be freed. Certainly nothing is copied or allocated during the operation.
On Mon, Aug 2, 2021 at 6:17 AM Rares Vernica <rvern...@gmail.com> wrote: > > Hello, > > I'm using RecordBatch:;AddColumn to update a RecordBatch. Something like > this: > > std::shared_ptr<arrow::RecordBatch> rb; > ... > rb = rb->AddColumn(...) > > Since AddColumn creates a new RecordBatch, is the memory taken by rb before > assignment being freed as expected. > > Thanks! > Rares