Annotation Type ArrayAllocator


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    public @interface ArrayAllocator
    An annotation indicating that a method should behave like an array allocator. However, methods with signature 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.

    See Also:
    Pointer.init(long, long, long, long), Generator