Skip to content

Commit 18c88fc

Browse files
committed
enableCreationStackTracking() for tests
1 parent 4e87631 commit 18c88fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

objectbox-java/src/main/java/io/objectbox/InternalAccess.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,10 @@ public static <T> void releaseWriter(Box<T> box, Cursor<T> writer) {
5151
public static <T> void commitWriter(Box<T> box, Cursor<T> writer) {
5252
box.commitWriter(writer);
5353
}
54+
55+
/** Makes creation more expensive, but lets Finalizers show the creation stack for dangling resources. */
56+
public static void enableCreationStackTracking() {
57+
Transaction.TRACK_CREATION_STACK = true;
58+
Cursor.TRACK_CREATION_STACK = true;
59+
}
5460
}

0 commit comments

Comments
 (0)