Call PhantomReference.clear() from close()
This commit is contained in:
parent
09b022e926
commit
ea6113d7fb
@ -131,8 +131,6 @@ public final class ResourceLeakDetector<T> {
|
||||
break;
|
||||
}
|
||||
|
||||
ref.clear();
|
||||
|
||||
if (!ref.close()) {
|
||||
continue;
|
||||
}
|
||||
@ -174,6 +172,7 @@ public final class ResourceLeakDetector<T> {
|
||||
|
||||
@Override
|
||||
public boolean close() {
|
||||
clear();
|
||||
if (freed.compareAndSet(false, true)) {
|
||||
synchronized (head) {
|
||||
active --;
|
||||
|
Loading…
Reference in New Issue
Block a user