File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is phantomly reference is possible ??

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have read that

An object is phantomly reachable, it means the object already has been finalized but not yet reclaimed.

Could anybody please tell me , how this is possible ??
 
Stephan van Hulst
Bartender
Pie
Posts: 4826
34
Chrome Netbeans IDE Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the designers made it to work. Is there anything specific you don't understand?
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is mainly a part of how the Garbage Collection and Java automatic memory management is working. If you don't have ANY references to an object it will be impossible to clean it out of the memory. It is also possible to reuse an object that might have been left for the GC to clean. One of those functions is when a piece of code is generating the same exception over and over again. The JVM might then choose to reuse the same Exception object and reclaim it from the GC.

To fully understand this, you should read up on Java memory management.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic