humble-video-noarch/src/main/java/io/humble/ferry/JNIMemoryManager.java
public long getNumPinnedObjects()
  {
    long numPinnedObjects = 0;
    blockingLock();
    try {
      int numItems = mNextAvailableReferenceSlot;
      for(int i = 0; i < numItems; i++)
      {
        JNIReference ref = mValidReferences[i];
        if (ref != null && !ref.isDeleted())
          ++numPinnedObjects;
      }
    } finally {
      blockingUnlock();
    }
    return numPinnedObjects;
  }
public long getNumPinnedObjects()
  {
    long numPinnedObjects = 0;
    blockingLock();
    try {
      int numItems = mNextAvailableReferenceSlot;
      for(int i = 0; i < numItems; i++)
      {
        JNIReference ref = mValidReferences[i];
        if (ref != null && !ref.isDeleted())
          ++numPinnedObjects;
      }
    } finally {
      blockingUnlock();
    }
    return numPinnedObjects;
  }
Get the number of Ferry objects we believe are still in use.
<p>
This may be different than what you think because the Java garbage
collector may not have collected all objects yet.
</p>
<p>
Also, this method needs to walk the entire ferry reference heap, so it
can be expensive and not accurate (as the value may change even before
this method returns).  Use only for debugging.
</p>
@return number of ferry objects in use.