@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface ArrayAllocator
native void allocateArray(int)
are
recognized as array allocators even without annotation. This behavior can be
changed by annotating the method with the Function
annotation.
In a nutshell, an array allocator uses the C++ new[]
operator, and
initializes the Pointer.address
as well as the Pointer.deallocator
with NativeDeallocator
, based on the delete[]
operator, if
not additionally annotated with NoDeallocator
.
Pointer.init(long, long, long, long)
,
Generator
Copyright © 2020. All rights reserved.