Distributed Garbage Collection
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hendrik_Gani
Posted On:   Wednesday, February 28, 2007 07:29 PM

Hi, I need some clarifications on RMI garbage collection. I read an article saying that RMI supports distributed garbage collection, which allows remote reference counting on a remote object. So I assume what it means is that if there is no reference to a remote object (including from its stubs), the object will be garbage collected. A few questions regarding this: When I profile my RMI application, my remote objects do not get gc'ed when I think they are supposed to/ What I am not sure is whether I need to unexport() the remote object first to get it gc'ed? According to the profiler, every of my stubs is referenced by an instance of sun.rmi.transp   More>>


Hi, I need some clarifications on RMI garbage collection.




I read an article saying that RMI supports distributed garbage collection, which allows remote reference counting on a remote object. So I assume what it means is that if there is no reference to a remote object (including from its stubs), the object will be garbage collected.




A few questions regarding this:


  1. When I profile my RMI application, my remote objects do not get gc'ed when I think they are supposed to/


    1. What I am not sure is whether I need to unexport() the remote object first to get it gc'ed?

    2. According to the profiler, every of my stubs is referenced by an instance of sun.rmi.transport.Target class. If this is the case, doesn't that mean my stubs will never get gc'ed because there is always a reference to it?


  2. Does RMI distributed GC also resolve circular referencing like the way normal GC does?
    E.g. In the case of "A -> B_Stub -> B -> A_Stub -> A", will A and B get gc'ed considering that they are only referencing each other.





Thanks very much!

   <<Less
About | Sitemap | Contact