kryo = null; // remove strong ref, now kryo is only weak-reachable
reclaim(kryoWeakRef);
}
public void testFastestStreamFactory () {
final FastestStreamFactory strongRefToStreamFactory = new FastestStreamFactory();
Kryo kryo = new Kryo(new DefaultClassResolver(), new MapReferenceResolver(), strongRefToStreamFactory);
WeakReference<Kryo> kryoWeakRef = new WeakReference<Kryo>(kryo);
kryo = null; // remove strong ref, now kryo is only weak-reachable
reclaim(kryoWeakRef);
}