You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic when using the feature to wrap an existing buffer (presumably the most common use case), for example: NIO.ByteBuffer.readData
This thing has to do an allocation to capture the reference to the underlying storage. To avoid that, it would be great to have a context pointer in the custom deallocator, like so:
Additional Detail from JIRA
md5: 3e2e0cc975b972d7a9c634e200043281
Issue Description:
The `Data` custom deallocator is currently defined as taking the ptr and the length:
This is problematic when using the feature to wrap an existing buffer (presumably the most common use case), for example: NIO.ByteBuffer.readData
This thing has to do an allocation to capture the reference to the underlying storage. To avoid that, it would be great to have a context pointer in the custom deallocator, like so:
This way the dealloc closure would be context free, no extra alloc would be necessary.
The text was updated successfully, but these errors were encountered: