intermediateJVM & GC416 of 436
What is a Retained Heap?
Tests whether you know retained size is the memory that would actually be freed if an object were garbage collected (itself plus everything only it keeps alive), which is why it's the number to sort by, not shallow size.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response