[ 
https://issues.apache.org/jira/browse/ARROW-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17662300#comment-17662300
 ] 

Rok Mihevc commented on ARROW-5277:
-----------------------------------

This issue has been migrated to [issue 
#21747|https://github.com/apache/arrow/issues/21747] on GitHub. Please see the 
[migration documentation|https://github.com/apache/arrow/issues/14542] for 
further details.

> [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