Annotation Type NoDeallocator


  • @Documented
    @Retention(RUNTIME)
    @Target({TYPE,METHOD})
    public @interface NoDeallocator
    By default, all allocators attach a deallocator to the peer object on creation. This way, the deallocator automatically gets called during garbage collection. Since an allocator uses the new (or for arrays the new[]) operator, the deallocator produced uses the delete (or delete[]) operator. However, if that operator is not accessible, or the native library does not use that operator for object deallocation, we may apply this annotation to an allocator method to prevent it from using these operators.
    See Also:
    Allocator, ArrayAllocator, Generator