CurtHagenlocher opened a new pull request, #525:
URL: https://github.com/apache/arrow-dotnet/pull/525

   ## What's Changed
   
   Adds `AllocationLifetime`, which states what happens to a buffer's memory if 
the buffer is never disposed: it is collected (`GarbageCollected`), leaked 
(`CallerOwned`), or released from a finalizer (`Finalized`, the historical 
behaviour). Only `Finalized` memory is released from `SharedMemoryHandle`'s 
finalizer; other lifetimes opt out, so collection can never release or recycle 
memory a span is still using (#397).
   
   - `ArrowBuffer(IMemoryOwner<byte>, AllocationLifetime)` is public, so 
callers can wrap their own memory without copying (see #97 and #523). The 
lifetime is required: the enum's default value, Unspecified, is rejected. The 
internal single-argument constructor is removed, so internal callers state a 
lifetime too.
   - `MemoryAllocator.Lifetime` is a new virtual property, defaulting to 
Finalized, so existing allocators are unaffected. Builders, the concatenator, 
the IPC writer and decompression pass it through.
   - Memory imported through the C Data Interface and `NativeBuffer` stay 
Finalized.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to