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

Not releasing LocalRefs on callbacks.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Beryllium
    • 2.7.0
    • Java
    • Security Level: Public
    • None
    • JAK 122
    • 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

          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:

                PagerDuty