All posts with Tag GC

Preview image blogpost

Enabling List<T> to store large amounts of elements

List<T> is one of the most versatile collection types in .NET. As it is meant for general-purpose use, it is not optimized for any specific use case. So, if we look closely enough, we will find scenarios where it falls short. One of these scenarios is when you have lots of data. This article will look at precisely this.

Read the whole article

The garbage collector in .NET - Part 2: Compacting

I already made a post about how the Garbage Collector works in .NET and also introduced the topic of Generation slightly. This article will look a bit more in detail into why we have those mechanisms in the first place, including the Large Object Heap.

Read the whole article

ObjectPool - Rent and return some instances

Just imagine a car pool: There is a dealer which bought the car and lent's it to you. After a while you will return this car where you got it from. Much like that works an ObjectPool in C#. You can rent an expensive object from the pool and when you are done with it, you just return it. Sounds beautiful, doesn't it?

Let's explore the advantages and disadvantages of a ObjectPools and how they work.

Read the whole article

The garbage collector in .NET

This article will talk about the garbage collector in .NET. Why do we have and need him? And why it is essential to understand the behavior to know what impact on our application he has.

Read the whole article

Preview image blogpost

Stop using Finalizers in C#

Finalizers (historically referred to as destructors) are in C# since its dawn of time and are used to cleanup resources. But they should not used in every use-case and can harm your applications performance.

Read the whole article

An error has occurred. This application may no longer respond until reloaded. Reload x