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. |