概念

  • SHALLOW HEAP:对象自身占用的内存大小;

Shallow heap of an object is its size in the memory.

  • RETAINED HEAP:对象能够被回收的内存大小,包括了直接引用和间接引用占用的内存;

Retained heap is the amount of memory that will be freed when the particular object is garbage collected

SHALLOW HEAP和RETAINED HEAP
参考:

  1. https://blog.gceasy.io/2019/01/03/shallow-heap-retained-heap/

相关文章: