@Test public void testCopyReferenceLoadTest() { assertEquals(0, JNIMemoryManager.getMgr().getNumPinnedObjects()); RefCounted obj = RefCountedTester.make(); for (int i = 0; i < 100000; i++) { RefCounted copy = obj.copyReference(); copy.delete(); } obj.delete(); assertEquals(0, JNIMemoryManager.getMgr().getNumPinnedObjects()); }