Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Memory leak in xamgrid
posted

When I use a TextBlockStyle on a TextColumn the XamGrid is never garbage collected.

I've added a test project. If you run it and  click on Remove datagrid, the datagrid is not garbage collected. If you remove the TextBlockStyle on the textColumn and run it again the datagrid is garbage collected after the click on Remove datagrid.

The datagrid is being kept in memory as follows:

This also happens with other styles (f.e. the ExpansionIndicatorSettings Style.)

XamGridMemoryLeak.zip
Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    As Francis stated there is a bug here. That should be fixed in the next SR.

    However i just wanted to let you know you can workaround it in a few ways. 

    1. Keep the style local to the xamGrid.  
                <ig:TextColumn>
                       <ig:TextColumn.TextBlockStyle>
                                <Style />
                       </ig:TextColumn.TextBlockStyle>
                 </ig:TextColumn>

    2. Clear the properties you set before you remove the xamGrid.

    3. Remove the style from your Resources collection when you remove the xamGrid. 

    -SteveZ

Children