static void Main(string[] args)
{
Console.WriteLine("Memory usage before unmanaged allocation: {0:N0}", GC.GetTotalMemory(false));
MyDataClass obj = new MyDataClass(10000000);
//unmanaged memory is not counted!
Console.WriteLine("Memory usage after unmanaged allocation: {0:N0}", GC.GetTotalMemory(false));
}
Memory usage before unmanaged allocation: 665,456
Memory usage after unmanaged allocation: 706,416