Infinite Lifetimes
-
Hello, I'm setting up a remoted object and was wondering about overriding the lifetime service. I overrode the method that allows me to define my own lease settings, but I was curious about what happens when I return null instead of the lease. The object is supposed to now have an infinite lifetime if you return null. So if I applied this to a Client Activated object, then every object a client makes will NEVER get garbage collected. Is this absolutely true? If so, is there a programmatic way that the client could tell the server that it is done with the object and it's OK to clean it up, even though the lifetime is set to infinite? It just seems odd to me that if a client activates 1000 objects and then sets them to null, and heck, even shuts itself down, the server will keep those objects hanging around. I don't want to build in any kind of sponsoring or lease renewal, I just want the object to stay around without keep-alives and 1 call that says I'm done using it. If something bad happens to the client and a couple objects get left hanging around, then so be it.
Assert(this);