It depends (I assume this is Python we are talking about). The BufferOutputStream is single use -- you write a stream and then get the result as a Buffer (BufferOutputStream.get_result). Same in C++. In principle we could add a reset method: https://issues.apache.org/jira/browse/ARROW-1521
You can reuse a mutable Buffer in some circumstances. The new pyarrow.allocate_buffer function in 0.7.0 allocates a fixed size mutable buffer of a certain size. The FixedSizeBufferWriter class can write to such a buffer. Many buffers are immutable, though, and so you can discard them when you are done. - Wes On Sun, Sep 10, 2017 at 11:48 PM, Rares Vernica <rvern...@gmail.com> wrote: > Hi, > > During the life of the program, can/should the Buffer or BufferOutputStream > be resused? > > If the data in them is no longer needed, can they be reset? Or should I not > worry about this as they get out of scope and just create new instances? > What is the intended pattern? > > Thanks! > Rares