Defines a lifetime lease object that is used by the remoting lifetime service.

See Also: ILease Members


public interface ILease


Distributed garbage collection controls when server applications can be deleted. Traditionally, distributed garbage collection uses reference counts and pinging for control. This works well when there are a few clients per object, but does not work well when there are thousands of clients per each object. The lifetime service can assume the function of a traditional distributed garbage collector, and scales well when the number of clients increases.

The lifetime service associates a lease with each remotely activated object. When the lease expires, the object is removed. A lease can specify that an object has an infinite lifetime.

Each AppDomain contains a lease manager that administers the leases in the domain. The lease manager periodically examines the leases for time expiration. If a lease has expired, it can either be canceled by removing its reference to the lease, or renewed by invoking one or more of the lease's sponsors.

A lease contains properties that determine its policies, and methods that renew the lease time. The lease exposes the System.Runtime.Remoting.Lifetime.ILease interface.

For an example showing how to use the System.Runtime.Remoting.Lifetime.ILease interface see Lifetimes.


Namespace: System.Runtime.Remoting.Lifetime
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,