6 Best Practices to Keep a .NET Application's Memory Healthy

6 Best Practices to Keep a .NET Application's Memory Healthy

Memory problems in a big .NET application are a silent killer of sorts. Kind of like high blood pressure. You can eat junk food for a long time ignoring it until one day you face a serious problem. In the case of a .NET program, that serious problem can be high memory consumption, major performance issues, and outright crashes. In this post, you'll see how to keep our application's blood pressure at healthy levels.

Demystifying Memory Profilers in C# .NET Part 3: Memory Pressure

Demystifying Memory Profilers in C# .NET Part 3: Memory Pressure

In this article, we'll see how GC activity can cause major performance problems. This phenomenon is called Memory Pressure and we'll see how to deal with it using memory profilers.

Demystifying Memory Profilers in C# .NET Part 2: Memory Leaks

Demystifying Memory Profilers in C# .NET Part 2: Memory Leaks

Memory leaks are very common, hard to notice, and eventually, lead to devastating consequences. The main tool to detect and fix memory leaks is a Memory Profiler. In fact, I believe the most common usage of memory profilers in .NET is exactly for the purpose of fixing memory leaks. In this article, you'll see exactly how to use memory profilers to find the leaky objects, why they are still referenced, and how to solve the problem.

Demystifying Memory Profilers in C# .NET Part 1: The Principles

Demystifying Memory Profilers in C# .NET Part 1: The Principles

Memory leaks and GC Pressure cause pretty inconvenient effects like out-of-memory crashes, performance problems, and high memory consumption. Our primary tools when dealing with those issues are memory profilers. They are one of the most important category of tools in .NET troubleshooting, and in this article, you'll see how to use them and extract the most information from them.

8 Ways You can Cause Memory Leaks in .NET

8 Ways You can Cause Memory Leaks in .NET

Memory leaks are sneakily bad creatures. It's easy to ignore them for a very long time, while they slowly destroy the application. With memory leaks, your memory consumption grows, creating GC pressure and performance problems. Finally, the program will just crash on an out-of-memory exception.

Find, Fix, and Avoid Memory Leaks in C# .NET: 8 Best Practices

Find, Fix, and Avoid Memory Leaks in C# .NET: 8 Best Practices

Finding, Fixing and learning to Avoid Memory Leaks is an important skill. I'll list 8 best practice techniques used by me and senior .NET developers that advised me for this article.

5 Techniques to avoid Memory Leaks by Events in C# .NET you should know

5 Techniques to avoid Memory Leaks by Events in C# .NET you should know

Event registrations in C# (and .NET in general) are the most common cause of memory leaks. At least from my experience. In fact, I saw so much memory leaks from events that seeing += in code immediately makes me suspicious.