Skip to content
| Marketplace
Sign in
Visual Studio>Tools>ClrHeapAllocationAnalyzer
ClrHeapAllocationAnalyzer

ClrHeapAllocationAnalyzer

Fons Sonnemans

|
861 installs
| (1) | Free
Clr Heap Allocation Analyzer is a Roslyn based Diagnostic Analyzer that is able to detect most allocations in code in the local method and bring them to your attention in Visual Studio. It can detect subtle allocations caused by value type boxing, closure captures, delegate in...
Download

Roslyn based C# heap allocation diagnostic analyzer.

It can detect most heap allocations including explicit allocations, value type to reference type (boxing), closure captures (a.k.a Display Classes) and can tell you why the closure is being captured. Implicit delegate creation and implicit allocations done by the compiler for params, etc.

It can also run as part of your build and flag as warnings. It is, however, most demonstrative in its code-assist form in the IDE.

This project is a fork of the archived RoslynClrHeapAllocationAnalyzer project. This allowed us to add new features for .NET6 and later to it. These newer targetframeworks have features which don't allocate objects any more which the original analyzer was still reporting. For example: in .NET6 string interpolation does not cause Boxing any more. This is now not reported any more.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft