wido/rados-java — pull request #5 by kiefermat (2013-07-16 08:58:10+00:00)
Title: Fixed random crash on finalization of a Rados object

Fixed random crash on finalization of a Rados object by changing the signature of rados_create to use PointerByReference instead of Pointer and then storing the dereferenced clusterPtr in the Rados object.

For some reason the java finalizer sometimes first finalized the Memory
object and then the Rados object which lead to a crash when dereferencing the clusterPtr in finalize().

I have added a test method which initializes Rados objects in a loop and the forces running the garbage collector and the finalizer in the loop so that the problem is more visible.