Java Professional — Hard
Key points
- Phantom references are enqueued in a ReferenceQueue after finalization
- They enable cleanup actions without resurrecting the object
- They are different from null references or weak references
- Phantom references are often used for resource cleanup after object finalization
Ready to go further?
Related questions
