| Author |
Message |
woodced
Joined: 26 Nov 2010 Posts: 3
|
Posted: Fri Nov 26, 2010 6:25 pm Post subject: Generic Lists and GCAlloc.Handle |
|
|
| In my Silverlight application I've got some member properties of Controls that are generic lists. For some reason when the Control is destroyed these are left behind as array structures referenced by a System.Object[] which has been GCHandle.Alloc'ed. Is this behavior correct, or is there something up with my app?[/img] |
|
| Back to top |
|
 |
AndrewH
Joined: 17 Aug 2006 Posts: 137
|
Posted: Mon Nov 29, 2010 12:44 pm Post subject: |
|
|
Static variable storage is implemented internally by .NET as object arrays referenced by GC handles. ANTS usually tries to decode which static variables are actually referencing the objects but can't always successfully resolve the values of all the variables due to the way the profiling API works.
Objects that can be 'interned', such as strings, will also end up in a similar object array, so this pattern doesn't always indicate a static variable.
However, it's most likely that this is what has happened here: there's a static variable somewhere that is referencing your class, but ANTS has been unable to resolve its name. _________________ Andrew Hunter
Software Developer
Red Gate Software Ltd. |
|
| Back to top |
|
 |
woodced
Joined: 26 Nov 2010 Posts: 3
|
Posted: Mon Nov 29, 2010 4:54 pm Post subject: |
|
|
Interesting. I can't see why I'd have a static reference to this, but I'd need to look into it further.
Under what circumstances is ANTS not able to decode the static variable reference? Is there any way of avoiding this circumstance? |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group