.Net memory profiler and <GCHandle> pinned

I use Scitech.Net Memory Profiler to check some things in my application (works on WinXP 64). I see many cases when there is one live copy of the list that uses my application, which is always 32 bytes and displayed as an array (for example, Products []).

When I take a closer look at the instance, it doesn't seem to refer to anything. If I check the box "Only instances of instances included in the root paths", the list of links is empty by default. If I uncheck this box, I only see:

Object[]    #307[9126]
    <GCHandle>  #306 {Pinned}

The distribution call stack is as follows:

mscorlib!System.Collections.Generic.List<T>..cctor()
[Skipped frame(s)]
mscorlib!System.Collections.ObjectModel.Collection<T>..ctor()
MyApp.ProductsAdmin!MyApp.ProductsAdmin.ViewModels.ProductsAdminViewModel..ctor() ProductsAdminViewModel.cs

It seems like it just ends up building an empty list. What does this mean when there are no instances included in the root paths and all I see is pinned?

+3
1

, List T. Reflector:

static List()
{
    List<T>._emptyArray = new T[0];
}
+3

All Articles