Native crash freeing a C4DocumentObserver (c4docobs_free)
Description
A C4DocumentObserver is and AutoClosable object. This is an indication to client code that they object should always have its `close` method called, as part of freeing it.
As a backstop, thought, a finalizer should be able to close the object successfully.
I've included two examples of native crashes. Both occur when a finalizer attempts to close the observer.
The Java code had a memory leak that prevented the observers that were not explicitly closed, from every being released (and thus finalized). Fixing that bug has revealed this one.
This bug is quite reproducible.
Just a guess: I wonder if the db is already gone....
A C4DocumentObserver is and AutoClosable object. This is an indication to client code that they object should always have its `close` method called, as part of freeing it.
As a backstop, thought, a finalizer should be able to close the object successfully.
I've included two examples of native crashes. Both occur when a finalizer attempts to close the observer.
The Java code had a memory leak that prevented the observers that were not explicitly closed, from every being released (and thus finalized). Fixing that bug has revealed this one.
This bug is quite reproducible.
Just a guess: I wonder if the db is already gone....