File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
objectbox-java/src/main/java/io/objectbox Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1160,9 +1160,12 @@ public int cleanStaleReadTransactions() {
1160
1160
}
1161
1161
1162
1162
/**
1163
- * Call this method from a thread that is about to be shutdown or likely not to use ObjectBox anymore:
1164
- * it frees any cached resources tied to the calling thread (e.g. readers). This method calls
1165
- * {@link Box#closeThreadResources()} for all initiated boxes ({@link #boxFor(Class)}).
1163
+ * Frees any cached resources tied to the calling thread (e.g. readers).
1164
+ * <p>
1165
+ * Call this method from a thread that is about to be shut down or likely not to use ObjectBox anymore.
1166
+ * <b>Careful:</b> ensure all transactions, like a query fetching results, have finished before.
1167
+ * <p>
1168
+ * This method calls {@link Box#closeThreadResources()} for all initiated boxes ({@link #boxFor(Class)}).
1166
1169
*/
1167
1170
public void closeThreadResources () {
1168
1171
for (Box <?> box : boxes .values ()) {
You can’t perform that action at this time.
0 commit comments