O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

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

Summary

This chapter explored the general architecture of CLR memory management. It discussed what the CLR does to efficiently manage your memory allocations so that you do not have to. This chapter also showed that, in many cases, a garbage collection scheme outperforms what is traditionally used for memory allocation and memory management with unmanaged code. It uncovered the details of what looks like a C++ destructor and explained that managed code has no destructors. You discovered an alternative to destructors, using the IDisposable interface, that allows your code to deterministically finalize your object in an efficient manor with safeguards built in for misuse of your object. You also learned about some optimizations that the runtime ...

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