I'm investigating a heap dump taken by a Hotspot-1.8 JVM. The dump is in hprof format and contains thousands of lambda instances.
They're all created from functions like this:
public class Ref<T> {
private T obj;
void set(final T value) {
obj = value;
singletonMgr.register(() -> Ref.close(value));
}
private static <T> void close(T obj) { /* stuff */ }
}
Works and the lambda shows up in the list singletonMgr
manages. But it's empty apart from the <class>
reference each object gets. I would have expected a reference to value
in there?
What am I missing and how can I evaluate each Lambda's value
?