Skip to content

MediumConceptJVM, Memory and Performance

What are strong, soft, weak and phantom references?

What a good answer covers

Strong references prevent collection. Soft references are cleared under memory pressure, weak ones at the next collection once unreachable otherwise, and phantom ones are used for post-finalisation cleanup.

More on JVM, Memory and Performance

Flashcards for this topic