Details
-
Bug
-
Resolution: Fixed
-
Critical
-
2.7.0
-
Security Level: Public
-
None
-
4
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
- is a backport of
-
CBL-5280 Not releasing LocalRefs on callbacks.
- Closed