We have a rather large silverlight 4 application. We are in the process of finding memory leaks in the application and this has turned into a daunting task.
Things have changed completely with this one, for those of you that have seen the original post!
I realised that ANTS memory profiler wasn't showing me the right stuff. That was because the memory leak was not in the managed code, but in the native code. I did fix some issues with ANTS - it is a good tool for managed code memory leaks.
So I found this blog,
Which was excellent. I used xPerf and xPerfViewer to view the native heap and see what I suspect is the actual memory leak.
So I can see a stack trace which looks like this,
CCoreServices::Draw
CCoreServices::Tick
CUElement::Render
CUIElement::Render
CUIElement::RenderWithTransform
CUIElement::RenderVisual
CUIElement::RenderChildren
{Repeat of the above in a recursive fashion}
So in this 'Render' method somewhere it allocates about 520 bytes of memory, and as far as I can tell it doesn't free it.
I can also see a method or class called
SDBitmapCreate
is leaking memory too.
Interesting because it seems like I have found something, but I am not really sure what.
Any other suggestions?
Thanks.