On Wed, 28 Apr 2021 13:08:26 GMT, Chris Hegarty <che...@openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Address first batch of review comments
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java
>  line 693:
> 
>> 691:      */
>> 692:     static MemorySegment allocateNative(MemoryLayout layout, 
>> ResourceScope scope) {
>> 693:         Objects.requireNonNull(scope);
> 
> Should the allocateNative methods declare that they throw ISE, if the given 
> ResourceScope is not alive?   ( I found myself asking this q, then 
> considering the behaviour of a SegmentAllocator that is asked to allocate 
> after a RS has been closed )

Good point, yes it should

-------------

PR: https://git.openjdk.java.net/jdk/pull/3699

Reply via email to