This is a migrated thread and some comments may be shown as answers.

SetSelectionAnchorItem() and Memory Leak

9 Answers 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Grégoire
Top achievements
Rank 1
Grégoire asked on 20 Nov 2012, 02:35 PM
Hello,

I am struggling with the notion of SelectionAnchor which seems to keep some instances even if there are no objects selected. I don't understand how and when they are chosen or released.

Can you tell me how I can release an anchorSelectionItem in code behind?

Thanks

9 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Nov 2012, 10:09 AM
Hello,

 We are not aware of any memory leak related to this method. Can you post more info on how to reproduce the problem? Can you reproduce this on some of our WPF demos? More info about your version will be helpful as well. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Grégoire
Top achievements
Rank 1
answered on 23 Nov 2012, 10:14 AM
I don't seem to be able to reproduce the leak at every trial so I can't provide any example. Anyway, I don't understand how Selection Anchors are suposed to work.

Can you explain it to me? After that I may be able of reproduce it.

Thank you,

Grégoire
0
Dimitrina
Telerik team
answered on 28 Nov 2012, 09:31 AM
Hi Grégoire,

What this method does is to set the first, anchor selected item when you are doing a Multiple or Extended selection. Please note that this will be the item available through the SelectedItem property of the RadGridView.

Are you now able to reproduce the Memory Leak?
 

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Grégoire
Top achievements
Rank 1
answered on 28 Nov 2012, 11:36 AM
Thanks,

Thanks to your post I came up with a way to reproduce it. It didn't show the AnchorSelection and it is not an actual memory leak. What it shows is that when you change a grid's ItemsSource while having multiple selected items, one item of the previous ItemsSource is kept in memory by the DetailsProvider until you select a new item in the grid.

That is not a major issue, but it can be annoying if the kept object hold a lot of memory when running a memory consumming routine after going the step described in the first part of this post.

I still don't know why the SelectionAnchor came in the way when I was doing the same thing in my main application.

Regards,

Grégoire
0
Dimitrina
Telerik team
answered on 30 Nov 2012, 09:30 AM
Hi Grégoire,

Thank you for clarifying. We were able to reproduce the issue and we are currently investigating it. I have updated your Telerik points for reporting this issue.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dimitrina
Telerik team
answered on 30 Nov 2012, 04:31 PM
Hello,

I am glad to inform you that we have located the source of the problem and a fix will be available within the next LIB.

We apologize for the inconvenience caused. 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Igor
Top achievements
Rank 2
answered on 16 Dec 2012, 01:14 PM
hey guys
is the memory leak fixed in the latest build?
0
Nick
Telerik team
answered on 17 Dec 2012, 07:40 AM
Hi Igor,

Yes the fix is available with our latest internal build. 

Kind regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Igor
Top achievements
Rank 2
answered on 17 Dec 2012, 07:41 AM
Thanks Nik! i will check it out shortly
Tags
GridView
Asked by
Grégoire
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Grégoire
Top achievements
Rank 1
Dimitrina
Telerik team
Igor
Top achievements
Rank 2
Nick
Telerik team
Share this question
or