You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/01/19 21:11:00 UTC

[jira] [Updated] (ARROW-15373) [C++] MemoryManager::AllocateBuffer should return unique_ptr

     [ https://issues.apache.org/jira/browse/ARROW-15373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ARROW-15373:
-----------------------------------
    Labels: pull-request-available  (was: )

> [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
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)