Automatic creation of ByteBuffers for StructSerializable data structures. #7953
Replies: 1 comment 3 replies
-
|
Passing in the ByteBuffer allows the allocation of the ByteBuffer to be reused the next time |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using a the void-returning
.pack()function of a Struct object to save data as a ByteBuffer, one of the parameters is the ByteBuffer object to insert data into. I was wondering why the user is being made to create the ByteBuffer rather than having.pack()create it internally and returning the modified ByteBuffer. I understand having it as an option, as it would allow you to pack multiple data structures into one buffer, but I think that having the function at least return the modified ByteBuffer would be somewhat helpful. Is this at all the kind of thing that would be worth implementing, or not?Beta Was this translation helpful? Give feedback.
All reactions