invesdwin / invesdwin-context-integration

invesdwin-context modules that provide integration features
GNU Lesser General Public License v3.0
1 stars 0 forks source link

reuse asNioByteBuffer instance on slices by manipulating position/limit #32

Open subes opened 1 year ago

subes commented 1 year ago

that way we won't need to create new slice instances inside the slice wrappers

though need to make sure that position/limit is reset on underlying asNioBuffer calls.

Or rather create a sliced copy once for each slice instance. Though this would not work with underlying expandable buffers.