hello,
from now i test te memory consumption of my application. I have some troubles with diagram free.
I use godiagram for wpf version 1.2.6.3.
With a memory profiler I see that after unload the “diagram”'s control, some GoXam.Node object still retained.
I observed that if I don’t show the associated overview, no more node still retained after control closing.
<go:Diagram x:Name="myDiagram" Loaded="myDiagram_Loaded" Unloaded="myDiagram_Unloaded"
InitialScale="1"
Grid.Column="2" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
AllowDrop="True" AllowCopy="True" AllowLink="True"
NodeTemplateDictionary="{StaticResource NodeTemplateDictionary}"
LinkTemplateDictionary="{StaticResource LinkTemplateDictionary}"
Layout="{Binding Options.LayoutChoosen}"
Padding="10 10 0 0"
SelectionChanged="myDiagram_SelectionChanged"
UnloadingClearsPartManager="False"
ContextMenu="{StaticResource menuDiagram}"
Model="{Binding QD_Model}" >
<go:Diagram.LayoutManager>
<go:LayoutManager Animated="False"/>
</go:Diagram.LayoutManager>
<go:Diagram.TextEditingTool>
<v6QDiagram:QD_TextEditingTool Starting="SingleClick"/>
</go:Diagram.TextEditingTool>
</go:Diagram>
private void myDiagram_Loaded(object sender, RoutedEventArgs e)
{
myDiagram.InitialLayoutCompleted += new EventHandler<DiagramEventArgs>(myDiagram_InitialLayoutCompleted);
}
private void myDiagram_Unloaded(object sender, RoutedEventArgs e)
{
myDiagram.InitialLayoutCompleted -= myDiagram_InitialLayoutCompleted;
}
private void myDiagram_InitialLayoutCompleted(object sender, DiagramEventArgs e)
{
myOverview.Observed = myDiagram;
}
I tried to reset myOverview.Observed (= null) in diagram_unloaded, but Node still retained.
Have you an idea ?
Thanks
Aurore