Abstract:
The JDK includes classes representing special types of Java references: soft, weak, and phantom. Used correctly, reference objects provide a powerful control mechanism for garbage collection of data structures to optimize performance and memory usage. Incorrectly used, they may not have the intended effect or, worse, applications can fail randomly and unexpectedly.This session describes the different types of reference objects; intended uses, with code samples; potential pitfalls; and how to avoid them.