Hi,
Firstly, I'd like to say that this is an excellent program. It's helped me find myriad leaks in a program that we've been working on for several months.
Now, my (first) problem:
We seem to have a big problem with strings leaking, and they all seem to arise from the same type of call. For the sake of brevity, I'll only list the offending piece of code, and try to explain what's going on:
Texture = ResourceManager.LoadTexture(Device, Common.CommonPaths.TexturePath + @"\TrackSymbolSquare.bmp");
Texture is a Windows.Xna.Framework.Graphics.Texture2D variable. The ResourceManager simply ensures that a Texture2D only gets created once, but functionally it returns a new Texture2D. CommonPaths.TexturePath is a static string.
The allocation stack of the new live instance always traces back to the String.Concat() method. My first instinct was that the new immutable string created from the String.Concat() was somehow referencing the static string, but that seems too stupid to be possible.
The only reference to the string is from System.Collections.Generic.Dictionary<ulong, ResourceData> that traces back up to the GraphicsDevice. The GraphicsDevice is a singleton that will never get destroyed until the program exits. The Texture2D instance that would reference that string as its "Name" property does not exist when I take the snapshot.
I don't expect anyone to have knowledge of the inner workings of Microsoft's Xna, but does this seem to be a memory leak in Xna? If more data/info is required to understand this, I'd be happy to provide it, as this problem is really bugging me.
*edit*
I was going to list this as a separate post, but while looking at the allocation stack, I noticed that the very large number of WeakReference new instances seemed to be arising from the same (or related) calls to Xna methods (e.g. Texture2D.FromFile(), VertexDeclaration..ctor(), etc.).