Lifetime Management
Managing the lifetime of a remote object is complex, but having control over when to release server resources is essential to the scalability and efficiency of any distributed system.
Historically, DCOM used a combination of reference counting and network pinging in order to determine when to free objects. While this technique worked decently enough in LAN’s with few clients, it resulted in problems when the number of clients increased (think in thousands) and was practically unfeasible over the Internet.
.NET uses a completely different approach and gives you direct control of the lifetime of your objects.
Whenever a MarshalByRefObject object is created, the .NET Framework calls its virtual method InitializeLifetimeService() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access