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

Antoine Pitrou resolved ARROW-15373.
------------------------------------
    Fix Version/s: 7.0.0
       Resolution: Fixed

Issue resolved by pull request 12192
[https://github.com/apache/arrow/pull/12192]

> [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
>             Fix For: 7.0.0
>
>          Time Spent: 0.5h
>  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)

Reply via email to