You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Li (Jira)" <ji...@apache.org> on 2022/01/19 19:32:00 UTC
[jira] [Created] (ARROW-15373) [C++] MemoryManager::AllocateBuffer should return unique_ptr
David Li created ARROW-15373:
--------------------------------
Summary: [C++] MemoryManager::AllocateBuffer should return unique_ptr
Key: ARROW-15373
URL: https://issues.apache.org/jira/browse/ARROW-15373
Project: Apache Arrow
Issue Type: Improvement
Components: C++
Reporter: David Li
Assignee: David Li
MemoryManager::AllocateBuffer currently returns shared_ptr<Buffer>, but analogously to arrow::AllocateBuffer, it should probably return unique_ptr<Buffer>. Also, we can convert a unique_ptr to a shared_ptr but not the other way around.
This would be a breaking change in a core API, though. I _think_ this API is not used much, given it is relatively new, but we should keep this in mind.
(Context: for the Flight/UCX prototype, I'm trying to integrate MemoryManager support given UCX can transparently handle some types of non-CPU memory, but while I've used mostly unique_ptr so far, MemoryManager uses shared_ptr which did cause a small snag.)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)