Eric Erhardt created ARROW-5277: ----------------------------------- Summary: [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
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 (v7.6.3#76005)