Is there any way to diagnose Unmanaged memory leak ? I am using .NET 5.0 Console App with NetCode. The program it self is simple it calls barcode library & creates a base64string from Image 5000 times, I am using 'using blocks' therefore disposing is also being handled. static void Main(string[] args) { Console.ReadKey(); for (int i = 0; i < 5000; i++) { Barcode bar = new Barcode("123456789123456", Type.Code128); using (var image = bar.GetImage()) { using (MemoryStream ms = new MemoryStream()) { image.Save(ms,ImageFormat.Png); var base64 = Convert.ToBase64String(ms.ToArray()); Console.WriteLine(i); } } } Console.ReadKey(); Console.ReadKey(); } On windows this program consumes 15-25 MB (doesn't go above that) but on Linux Unmanaged memory constantly increases with each iteration but never goes down at all (goes upto 600MB on 5000 iterations). [![enter image description here][2]][2] Linux dotMemory: [![enter image description here][3]][3] [![enter image description here][4]][4] Windows dotMemory: [![enter image description here][5]][5] I have tried the same program after fixing the Font, FontFamily disposing issue but the results are same. I am using docker with: FROM mcr.microsoft.com/dotnet/aspnet:5.0.15-focal as base FROM mcr.microsoft.com/dotnet/sdk:5.0.406-focal AS build Whole demo with dockerfile & dotmemory snapshots can be found [here][6]. [1]: https://github.com/Tagliatti/NetBarcode [2]: https://i.stack.imgur.com/uVAcU.png [3]: https://i.stack.imgur.com/ka9iK.png [4]: https://i.stack.imgur.com/MM64V.png [5]: https://i.stack.imgur.com/kLUTy.png [6]: https://github.com/D4n1aLLL/NetCode-Demo