About This eBook by Bart De Smet

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

O'Reilly logo

Leave the GC Alone (Most of the Time)

Automatic memory management has been one of the biggest features of the managed code execution engine, relieving developers of the burden of writing error-prone pieces of code to deal with proper cleanup of resources. That said, in some cases the garbage collector (GC) needs a bit of your cooperation to do the right thing. But let’s not go too fast. Dealing with the GC directly should be more of an exception than a rule. In fact, the collector exhibits its best performance if it’s left alone to determine when and what to do by itself.

Philosophy of Generations

As discussed previously on various occasions, the managed memory heap maintained by the CLR is divided into three generations, numbered 0 through ...

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