pitrou commented on a change in pull request #10427:
URL: https://github.com/apache/arrow/pull/10427#discussion_r643247160



##########
File path: docs/source/python/ipc.rst
##########
@@ -105,6 +105,11 @@ An important point is that if the input source supports 
zero-copy reads
 (e.g. like a memory map, or ``pyarrow.BufferReader``), then the returned
 batches are also zero-copy and do not allocate any new memory on read.
 
+All stream objects have a ``close`` method. In the above example 
+:func:`~pyarrow.BufferOutputStream.getvalue` both closes and returns the 
buffer.
+If the return object is not needed, call the relevent ``close`` method
+after you are finished using the object to avoid data corruption issues.

Review comment:
       Also mention that the context protocol should work as well (i.e. the 
`with` statement).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to