我有一个对象,它是几个其他对象的组合。当我使用 Instrumentation 包中的 getObjectSize() 方法时,它是否还包括复合对象的大小?
最佳答案
API doc说:
The result may include some or all of the object's overhead, and thus is useful for comparison within an implementation but not between implementations. The estimate may change during a single invocation of the JVM.
关于java - 使用 Instrumentation 获取对象大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2430828/