Hello
I know my question is not RadControl related, but I still hope you can help me with my issue.
I have a main silverlight solution, composed of several small silverlight project, which are different UserControl that are being called at different times in the runtime of the application.
When I'm calling more than one time one of these usercontrols, my solution crashes, telling me that the visual tree already contains one particular framework element (in this case, a storyboard).
Si I've been looking around, and I supposed it might be caused by the fact that the garbage collector, when the object is destroyed, doesn't collect it and then, doesn't clear the visual tree.
So I started debbuging the solution using WinDbg and sos.dll, and I saw after I remove the object that some reference were still there.
I've tried to implement the IDisposable interface in all the classes of the usercontrol and manage to remove a lot of memory leaks, but there are two types of leak I cannot get rid of.
Here's the result in WinDbg of the command dumpheap -stat -type
032a285c 2 24 SilverApp.DetailArticle+<>c__DisplayClass3
03070d98 2 24 SilverApp.Converters.ImageLinkConverter
0307ec4c 1 32 SilverApp.LigneCommandeValideeEventHandler
03070e6c 3 36 SilverApp.Converters.MoneyConverter
03072c24 1 116 SilverApp.Adresse
03075f9c 4 128 SilverApp.LigneCommandeSelectionneeEventHandler
03075d84 1 140 SilverApp.dgCategorieCommande
03070bb4 1 140 SilverApp.Panier
030702c4 1 168 SilverApp.EnteteCommande
030707a4 1 228 SilverApp.DetailArticle
02b4eb90 1 300 SilverApp.Page
Both converters (ImageLinkConverter and MoneyConverter) are not destroyed,and the custom EventHandlers aren'r either.
I think I've tried everything, from GC.Collect to WeakReferences, I don't seem to be able to remove those references and clear completely my SilverApp object from the memory.
So my question is, does anyone know of a way to remove all that crap from the memory and make sure a Usercontrol is cleared from the visual tree as well when destroyed (Dispose method, null affectation, ClearValue method...)
Thanks for reading
Ludovic
I know my question is not RadControl related, but I still hope you can help me with my issue.
I have a main silverlight solution, composed of several small silverlight project, which are different UserControl that are being called at different times in the runtime of the application.
When I'm calling more than one time one of these usercontrols, my solution crashes, telling me that the visual tree already contains one particular framework element (in this case, a storyboard).
Si I've been looking around, and I supposed it might be caused by the fact that the garbage collector, when the object is destroyed, doesn't collect it and then, doesn't clear the visual tree.
So I started debbuging the solution using WinDbg and sos.dll, and I saw after I remove the object that some reference were still there.
I've tried to implement the IDisposable interface in all the classes of the usercontrol and manage to remove a lot of memory leaks, but there are two types of leak I cannot get rid of.
Here's the result in WinDbg of the command dumpheap -stat -type
032a285c 2 24 SilverApp.DetailArticle+<>c__DisplayClass3
03070d98 2 24 SilverApp.Converters.ImageLinkConverter
0307ec4c 1 32 SilverApp.LigneCommandeValideeEventHandler
03070e6c 3 36 SilverApp.Converters.MoneyConverter
03072c24 1 116 SilverApp.Adresse
03075f9c 4 128 SilverApp.LigneCommandeSelectionneeEventHandler
03075d84 1 140 SilverApp.dgCategorieCommande
03070bb4 1 140 SilverApp.Panier
030702c4 1 168 SilverApp.EnteteCommande
030707a4 1 228 SilverApp.DetailArticle
02b4eb90 1 300 SilverApp.Page
Both converters (ImageLinkConverter and MoneyConverter) are not destroyed,and the custom EventHandlers aren'r either.
I think I've tried everything, from GC.Collect to WeakReferences, I don't seem to be able to remove those references and clear completely my SilverApp object from the memory.
So my question is, does anyone know of a way to remove all that crap from the memory and make sure a Usercontrol is cleared from the visual tree as well when destroyed (Dispose method, null affectation, ClearValue method...)
Thanks for reading
Ludovic