• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reference Types in Java  RSS feed

 
Vaibhav Gargs
Ranch Hand
Posts: 116
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going through multiple reference types (Weak, Phantom, Soft) in Java. Below is the URL:

http://javaconceptoftheday.com/types-of-references-in-java-strong-soft-weak-and-phantom/


I am unable to understand these reference types. Can anyone please explain these?
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you been through the documentation for the Reference class and its three subclasses?
The concept behind the Reference class is really quite simple: if the Reference to an Object is the only way it is reachable, then it is eligible for garbage collection. The three subclasses make their references available for garbage collection under different circumstances. The package summary is probably also very helpful.
I think the link you gave us is quite clear; please tell us which parts of the links you don't understand.
 
Stephan van Hulst
Saloon Keeper
Posts: 7961
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote some comprehensive explanations in this thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!