Description
JNI LocalRefs are released under two conditions:
- return to the JVM from a native call
- detaching a thread
A callback from LiteCore into the JVM never returns to the JVM, so LocalRefs created in the callback process are only released if the calling thread is detached. Fortunately, apparently, the calling thread is, frequently, detached (otherwise we'd be seeing massive memory leaks)
We need to delete the local refs explicitly.
Attachments
Issue Links
- backports to
-
CBL-5401 HELIUM: Not releasing LocalRefs on callbacks.
- Closed