Search code examples
c#wpfvb.netred-gate-antsants

Is my WPF UserControl being leaked through something I am doing wrong?


This is the first time I have used a profiler and thus also my first time for the ANTs Memory Profiler.

I have set up a test to isolated 2 user controls (written by me) on a test window called "WindowTest"

On WindowTest there is a user control DBDocComment. Within DBDocComment there is second user control but it is not appearing in the image. I am simply opening WindowTest from the main window and then closing it.

The thing that I am seeing but do not understand is indicated in the image. After WindowTest is closed I would consider that a reference to my user control DBDocComment should not be hanging around, but it is.

Can someone help me out here or please and point me in a direction to help me see what is going on.

enter image description here


Solution

  • I tested a number of memory profilers such as ANTs Memory Profiler and came to the conclusion that they all looked great but I could not understand what was going on.

    I believe that the answer to the above question is that it is not a leak. It appears that there are many false positives which are very hard to understand.