@Retention(value=RUNTIME) @Target(value=METHOD) public @interface PinnedObjectField
fields
of Object
types in structures
. This
is inherently dangerous, because such fields are not visited by the garbage collector. Therefore,
only references to objects that are never moved and never freed by the garbage collector can be
safely stored in such fields. That can be objects that are in the native image or objects that
are pinned.
This annotation serves as a marker, by using it you acknowledge that you know what you are doing.