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

Rok Mihevc updated ARROW-5277:
------------------------------
    External issue URL: https://github.com/apache/arrow/issues/21747

> [C#] MemoryAllocator.Allocate(length: 0) should not return null
> ---------------------------------------------------------------
>
>                 Key: ARROW-5277
>                 URL: https://issues.apache.org/jira/browse/ARROW-5277
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C#
>            Reporter: Eric Erhardt
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.16.0
>
>   Original Estimate: 24h
>          Time Spent: 0.5h
>  Remaining Estimate: 23.5h
>
> See the conversation 
> [here|https://github.com/apache/arrow/pull/3925#discussion_r281187184].
> We should change MemoryAllocator to not return `null` when the requested 
> memory length is `0`. Instead, we should create a cached "NullObject" 
> IMemoryOwner that has a no-op `Dispose` method, and always returns 
> `Memory<T>.Empty`.
> This way consuming code doesn't need to check for `null` being returned from 
> MemoryAllocator.Allocate.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to