Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-5401

HELIUM: Not releasing LocalRefs on callbacks.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.6
    • 2.7.0
    • Java, Java-Android
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              blake.meike Blake Meike
              blake.meike Blake Meike
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty