Mike Murphy
Mike Murphy

Reputation:

Windbg: SOS.dll: !gcroot: DOMAIN(xxx):HANDLE(Pinned):Does it really mean object is pinned?

The documentation on the SOS.dll Windbg extension seems sparse. After issuing a !gcroot <address>, I am getting something containing the following:

DOMAIN(XXX):HANDLE(Pinned):XXX:Root:XXX(System.Object[])->

Does "HANDLE(Pinned)" really mean there is a GCHandle of type GCHandleType.Pinned that is rooting this object?

Upvotes: 5

Views: 3961

Answers (4)

Mark Sowul
Mark Sowul

Reputation: 10610

It's probably not pinned, per se, but rather is probably a static reference. Take a look here: http://blogs.msdn.com/dougste/archive/2005/11/25/497016.aspx

Upvotes: 4

Reputation:

Yes it does mean the object is pinned. Now you have to find what is pinning the object and preventing it from being garbage collected.

Upvotes: 1

steve
steve

Reputation: 6020

Yes it does. Another possible value instead of pinned is WeakLn, which means it will be garbage collected on the next sweep.

Upvotes: 0

Mike Murphy
Mike Murphy

Reputation:

I know that Karel Zikmund, MSFT Moderator at http://social.msdn.microsoft.com/Forums/en-US/clr/thread/e52936b4-15c4-434f-91b9-4640df66d0c6 says "yes." But I'm looking for extra opinions, insight, etc. Thanks!

Upvotes: -1

Related Questions