For the time being, the answer is no. A student at France Telecom started to work on it, but this work was never sufficiently stabilized to be integrated in the release.

I have never really worked on the problem myself, but the following principle could work :

  • Add an acquire() and a release() method on the remote interfaces you're interested in (or define an appropriate Remote interface and use interface inheritance)
  • The acquire() method simply increases a counter
  • The release() method decrements it.
  • When a client receives a remote object, it calls the acquire() method on it. When it stops using a remote object, it calls the release() method on it. This could be done automatically when creating and finalizing stubs, but it should only be done on the client side. You may patch your stubs to do that.
One solution to actually garbage collect your objects on the server side would be to use a list of all no longer acquired exported objects (the value of their counter is zero). When a new object is released, and its counter becomes zero, you add it to the list. If the length of the list becomes greater than a given constant, you remove the oldest object in the list and unexport it.

This mecanism is simple, and may be a workaround, but it is not correct in all cases : you may be unlucky and remove objects just while you were sending their reference to some client. However, applicative considerations may give you hints whether this is a risk or not.

Hope this helps !

Bruno

Gerard BORREILL wrote:

Hello,

 Does anyone know if there is a version of Jeremie that has an
implemented distributed garbage collector ? I really need this because
when a client disconnects from my server, remote objects are never
garbage collected, and it generates memory leaks.
 Is there a work around, or do I have to implement a distributed garbage
collector ? Is there anyone working on it ?
 I am using the 2.4 version, and knows that it does not support
distributed garbage collection.

Gérard,

To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonathan".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

begin:vcard 
n:Dumant;Bruno 
tel;cell:06 75 20 76 64
tel;fax:33 1 49 26 09 76
tel;work:33 1 42 44 40 74
x-mozilla-html:FALSE
url:www.kelua.com
org:Kelua SA
adr:;;55 rue Sainte Anne;Paris;;75002;France
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;1
fn:Bruno Dumant
end:vcard

Reply via email to