You can use WMemoryProfiler to find out how many additional types have been created. If you profile your own process, you will get all additional types created + some instances used by WMemoryProfiler to generate the report.
You can work through a separate process to control your managed heap or limit yourself to just your types. If you skip memory, you will usually see it in additional instances you created.
using (var dumper = new InProcessMemoryDumper(false,false)) { var statOld = dumper.GetMemoryStatistics();
If you use how many temporary memory objects you used, you will need to use some profiling Api or tools such as PerfView, which uses the ETL traces generated by the CLR. For GC, you need to programmatically enable certain things, such as it. I think the GCAllocationTick_V1 event would be interesting in your case.
If you keep a reference to your object before trying to get diff, you get a pretty good idea of how much memory your graphic will consume.
source share