public class MemoryLeakVerifier<T> extends Object
| Constructor and Description |
|---|
MemoryLeakVerifier(T object) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertGarbageCollected()
Attempts to perform a full garbage collection so that all weak references will be removed.
|
Object |
getObject() |
WeakReference<T> |
getReference() |
@Nonnull public WeakReference<T> getReference()
public void assertGarbageCollected()
Based upon the method described in: http://www.javaworld.com/javaworld/javatips/jw-javatip130.html
Copyright © 2007–2016 cedarsoft GmbH. All rights reserved.