title: When to use phantom references in Java?
body: <p>I have read about the different types of reference. I understand how strong, soft and weak references work.</p>
  
  <p>But when I read about phantom references, I could not really understand them. Maybe because I could not find any good examples that show me what their purpose is or when to use them.</p>
  
  <p>Could you show me some code examples that use a phantom reference?</p>