Commit 19bc7865 authored by Alexey Kudravtsev's avatar Alexey Kudravtsev
Browse files

show the top leaked object

parent 993380b9
Branches unavailable Tags unavailable
No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
...@@ -199,9 +199,11 @@ public final class ObjectTree<T> { ...@@ -199,9 +199,11 @@ public final class ObjectTree<T> {
synchronized (treeLock) { synchronized (treeLock) {
for (T object : myRootObjects) { for (T object : myRootObjects) {
if (object == null) continue; if (object == null) continue;
final ObjectNode<T> objectNode = getNode(object); ObjectNode<T> objectNode = getNode(object);
if (objectNode == null) continue; if (objectNode == null) continue;
while (objectNode.getParent() != null) {
objectNode = objectNode.getParent();
}
final Throwable trace = objectNode.getTrace(); final Throwable trace = objectNode.getTrace();
RuntimeException exception = new RuntimeException("Memory leak detected: " + object + " of class " + object.getClass() RuntimeException exception = new RuntimeException("Memory leak detected: " + object + " of class " + object.getClass()
+ "\nSee the cause for the corresponding Disposer.register() stacktrace:\n", + "\nSee the cause for the corresponding Disposer.register() stacktrace:\n",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment