[12] 8193822: Remove unused newDirectByteBuffer and truncate methods from buffer classes
Henry Jen
henry.jen at oracle.com
Wed Aug 8 20:25:17 UTC 2018
That’s true, current use case is for Pointer returned from native call but not those allocated with Scope. We will need extra work on this.
Just that without this method, I would like to know what other approaches would be possible. This to us is like a direct replacement for JNI NewDirectByteBuffer call.
Cheers,
Henry
> On Aug 8, 2018, at 11:32 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>
> I think the case of going from Pointer -> ByteBuffer will require more work because of scoping e.g. what if the Pointer goes out of scope freeing up the memory but the ByteBuffer is still being used?
>
> Paul.
>
>> On Aug 8, 2018, at 11:28 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>>
>> Not that I know of. If we need to put it back we need a new issue and I’ll take care of it. Sorry for the complication.
>>
>> Brian
>>
>> On Aug 8, 2018, at 10:24 AM, Henry Jen <henry.jen at oracle.com> wrote:
>>
>>> I actually used this method in panama, is there a replacement? Line 194 at
>>>
>>> http://hg.openjdk.java.net/panama/dev/file/d7a12ed2faf9/src/java.base/share/classes/java/foreign/memory/Pointer.java
>>
>
More information about the nio-dev
mailing list