What are leasetime, sponsorshiptime, renewoncalltime and leasemanagerpolltime
How does garbage collector work on a remoting environment, because objects are created on a remote system which is outside the memory of the client system? or how will the server detect that an object is no longer used by a client system. in order to manage garbage collection in a remoting environment .net uses mechanisms like leasetime, sponsorshiptime, renewoncalltime and leasemanagerpolltime. this is also known as leasing distributed garbage collector (ldgc)
leasetime – leasetime property is set to define the time an object will be alive on a server. the default value will be 5 minutes, which means a remoting object created on the server will be alive for five minutes. we can increase or decrease this value based on requirement.
renewoncalltime – this property define the time an object will be alive after a call made to the server. the default value will be two minutes
sponsorshiptime – when the life time of an object becomes zero, it waits for a sponsor to become available. this is known as sponsorshiptime and the default value will be two minutes.
leasemanagerpolltime – the time a sponsor has to return a lease time extension is known as leasemanagerpolltime