pengshengc commented on code in PR #55635: URL: https://github.com/apache/arrow/pull/55635#discussion_r4638613279
########## cpp/src/arrow/ipc/writer.cc: ########## @@ -980,6 +980,7 @@ Result<std::unique_ptr<Message>> GetTensorMessage(const Tensor& tensor, IpcWriteOptions options; options.alignment = kTensorAlignment; + options.memory_pool = pool; Review Comment: now that the metadata buffer comes from the caller's pool, the returned Message owns memory tied to pool (PoolBuffer keeps a raw MemoryPool*). Should the pool parameter doc mention that it must outlive the returned Message? The test happens to destroy the pool last, but the requirement isn't spelled out in writer.h. Still getting familiar with this code, so feel free to ignore. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
