O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required