Invalidated context may be used in query observer callback
Description
After was fixed in LiteCore, we have seen that if the change callback is called after the c4queryobserver is disabled and the context object passed to th c4queryobserver is released (freed), the already-freed context object will be used and cause the crash.
The usage scenario that could cause the problem is when the query's listener token is removed at the same time that there is a new query's result change to be notified.
Build couchbase-lite-c-3.2.0-41 contains couchbase-lite-c commit 3795baf with commit message: : Fix a released captured context may be used in observer callback + LiteCore 3.2.0-189 (#534)
Fixed
Pinned fields
Click on the next to a field label to start pinning.
After was fixed in LiteCore, we have seen that if the change callback is called after the c4queryobserver is disabled and the context object passed to th c4queryobserver is released (freed), the already-freed context object will be used and cause the crash.
The usage scenario that could cause the problem is when the query's listener token is removed at the same time that there is a new query's result change to be notified.