You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,13 @@ $ cargo test --features=enterprise
82
82
83
83
### Run with Couchbase Lite C leak check
84
84
85
+
Couchbase Lite C allows checking if instances of their objects are still alive through the functions `CBL_InstanceCount` & `CBL_DumpInstances`.
86
+
If the `LEAK_CHECK` environment variable is set, we check that the number of instances at the end of each test is 0.
87
+
88
+
If this step fails in one of your pull requests, you should look into the `wrap`/`retain` logic on CBL pointers in the constructor of the Rust structs:
89
+
-`wrap` takes ownership of the pointer, it will not increase the ref count of the `ref` CBL pointer so releasing it (in a `drop`) will destroy the pointer
90
+
-`retain` just references the pointer, it will increase the ref count of CBL pointers so releasing it will not destroy the pointer
91
+
85
92
```shell
86
93
$ LEAK_CHECK=y cargo test --features=enterprise -- --test-threads 1
0 commit comments