You want to configure how long a singleton or client-activated object lives while not in use.
Configure a lease policy by using configuration file settings, overriding the InitializeLifetimeService method, or implementing a custom lease provider.
If an object uses single-call activation, it will be automatically destroyed at the end of each method call. This behavior changes with client-activated and singleton objects, which are given a longer lifetime dictated by a lifetime lease. With the default settings, a remote object will be automatically destroyed if it’s inactive for two minutes, provided it has been in existence for at least five minutes.
The component host, client, and remote ...