You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Eric Erhardt (Jira)" <ji...@apache.org> on 2020/01/23 16:20:00 UTC
[jira] [Resolved] (ARROW-5277) [C#]
MemoryAllocator.Allocate(length: 0) should not return null
[ https://issues.apache.org/jira/browse/ARROW-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Erhardt resolved ARROW-5277.
---------------------------------
Fix Version/s: 0.16.0
Resolution: Fixed
Issue resolved by pull request 6179
[https://github.com/apache/arrow/pull/6179]
> [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.3.4#803005)