Top Description Methods
jnr.ffi.annotations

public @Interface Direct

extends Annotation
Annotations
@Retention:RUNTIME
@Target:PARAMETER, ANNOTATION_TYPE
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Indicates that a jnr.ffi.Struct} parameter should be backed by a persistent native memory block.

Without the @Direct annotation, the native code will allocate a temporary native memory block for the parameter, and free it immediately after the call.

By using @Direct, the native memory block is permanently associated with the jnr.ffi.Struct instance, and will remain allocated for as long as the Struct instance remains strongly referenced by java code.

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString