-
Bug
-
Resolution: Fixed
-
P2
-
None
-
repo-panama
Dereferencing a segment from a LibraryLookup is possible, in the following form:
LibraryLookup libLookup = ...
MemorySegment segment = libLookup.lookup("foo").asSegmentRestricted(....)
The above code has a problem: there is no link between the produced segment and the original library lookup - meaning that, in principle, it's possible for the library to be unloaded when dereference occurs.
LibraryLookup libLookup = ...
MemorySegment segment = libLookup.lookup("foo").asSegmentRestricted(....)
The above code has a problem: there is no link between the produced segment and the original library lookup - meaning that, in principle, it's possible for the library to be unloaded when dereference occurs.