Re:Allocation is cheap in .NET until it is not
by kevingadd on Wednesday January 24, 2018 @06:26PM
(#16227306)
Makes sense. I make a point of calling Free but it wasn't clear to me whether the pin was attached to the object reference (since the handle contains a reference).
GCHandle is a struct so you have to explicitly call GCHandle.Free().