When you write managed code you propably think “Hey, .NET manages the memory, so I don’t care about it”. But you are not right. When you write code, no matter what the programming language is, you should always think about memory, especially when it comes to performance optimization. Although .NET provides a managed environment, memory leaks can still occur if you are not cautious.
Here is a great video explaining .NET memory management in details.
- Why memory matters
- .NET Memory and Garbage Collection
- Generational Garbage Collection
- Temporary Objects
- Large Object Heap and Fragmentation
- Finalization
- Memory Problems
- Summary