O'Reilly logo

Under the Hood of .NET Memory Management by Chris Farrell, Nick Harrison

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

Chapter 4: Common Memory Problems

The .NET Framework is, quite simply, huge, with many areas affecting memory management and potentially causing memory problems, some of which we'll explore in this chapter. We will start by reviewing the basic type system and how this affects memory usage. We will then take a deep dive into the Dispose pattern, exploring how this will impact memory usage and the way the GC (GC) performs.

Along the way, we will also find some surprising things affecting memory. The .NET Framework does a lot for us and some of this adds extra overhead that we easily forget about. How do immutable strings affect memory? What about the overhead of a class header? We will explore these, and other questions, as we consider the differences ...

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