Skip to content

Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.

License

Notifications You must be signed in to change notification settings

sonnemaf/RoslynClrHeapAllocationAnalyzer

 
 

Repository files navigation

Reflection IT - Clr Heap Allocation Analyzer

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:

  • .NET6 string interpolation does not cause Boxing any more.
  • C# 11.0 doesn't cause a Type Conversion Allocation when creating a delegate to a Static Member.

NuGet packages

Package Version
ReflectionIT.ClrHeapAllocationAnalyzer NuGet

Quick Video: https://www.youtube.com/watch?v=Tw-wgT-cXYU&hd=1

Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.

You can find also install the Visual Studio Extension from the Visual Studio Marketplace, https://marketplace.visualstudio.com/items?itemName=FonsSonnemans.ClrHeapAllocationAnalyzer

example

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 80.3%
  • PowerShell 19.7%