I'm evaluating ANTS Memory Profile trying to solve a memory leak problem of my WPF application.
This application has a main menu and open a sequence of defined windows, depending on the user requested function. When the user session ends, i destroy all the open windows (beginning from last opened).
I noticed, also using ANTS Memory Profile (before I saw abnormal memory allocation), that every new session i have multiple live istance of windows.. so i have a classic memory leak. I tested the destroying routine, and it's ok, I examined also the retention graph produced by ANTS, but i'm not able to understand wich object maintain the windows live.
is the retention graph of a windows during the first session. The windows is RB_InserimentoPNR.
With the second session i have two istance of the RB_InserimentoPNR window, a new one with the same retention graph above, and the old one (the one i closed but GC doesn't destroy) with this
As I said I'm not able to determine why the object was not released, the only event handler i see seems to be wpf stuff, not mine.
Can someone help me?