You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case that instance contains reference to Class, MemoryMeter counts size of whole class to size of instance. Example:
for A B it says 16B, for C 16736B
import org.github.jamm.MemoryMeter;
public class Test {
public static void main(final String[] args) throws InterruptedException {
MemoryMeter mm = new MemoryMeter();
System.out.println(mm.measureDeep(new A()));
System.out.println(mm.measureDeep(new B()));
System.out.println(mm.measureDeep(new C()));
}
static class A {}
static class B {
Class<B> c;
}
static class C {
Class<C> c = C.class;
}
}
The text was updated successfully, but these errors were encountered:
Added the option (in trunk) to exclude the recursive size calculations of known singletons, which currently are Class objects, and Enums. use new MemoryMeter().ignoreKnownSingletons();
In case that instance contains reference to Class, MemoryMeter counts size of whole class to size of instance. Example:
for A B it says 16B, for C 16736B
import org.github.jamm.MemoryMeter;
public class Test {
}
The text was updated successfully, but these errors were encountered: