• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unreferenced and DGC

 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Once unreferenced is called on an object by the RMI runtime and there are no other local references to the object, is the object then eligible for garbage collection?
Thanks in advance
Michael Morris
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think so. But why do you ask?
Mark
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
Curiosity more than anything. I was also debating whether or not to add a finalize() method, but if there are no local references to such an object then unreferenced() serves the same purpose.
Thanks,
Michael Morris
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I asked because I was afraid that you were going to try and use a finalize method, which I would avoid at all costs.
Mark
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!