controlflow / resharper-heapview

ReSharper Heap Allocations Viewer plugin
MIT License
303 stars 28 forks source link

Boxing Allocation (Question) #41

Closed Mike-E-angelo closed 7 years ago

Mike-E-angelo commented 7 years ago

I have another one for you. :)

Consider the following:

When I switch the call to:

You can see that the analysis error goes away. However, the value still ultimate gets boxed once it finds its way into CheckObject, correct? I am looking to verify my understanding here.

Mike-E-angelo commented 7 years ago

Wanted to check in on this. Is my understanding correct that the value type still gets boxed in the 2nd screenshot? Or maybe I should open a StackOverflow? 😛

controlflow commented 7 years ago

Yes, your understanding is correct, instance would box. Unfortunately, HeapView plugin do not reports possible boxing allocations at this point.

Mike-E-angelo commented 7 years ago

Great, that's basically what I was after, @controlflow. I was making sure there wasn't some magic I was missing. :) Thank you for your assistance and insight!