This method of the DllLib class returns the address of the object's data while an object is pinned.
public static int addrOfPinnedObject(int nHandleIndex);
While an address is pinned, it will not be reclaimed by the garbage collector and will not move in memory. You must specifically free this handle by calling freePinnedHandle. For performance reasons, objects should not be pinned for long periods of time. Generally, you will pin an array during some native I/O operation, and then unpin it.
Note Only single-dimension arrays of primitive types can be pinned.
Returns the address of the object that is encapsulated by the given pinned handle.
nHandleIndex | A pinned handle that is obtained by calling getPinnedHandle. |