Hi Nuno,
In the related blog post there are actually two fixes, because there are two possible scenarios for memory leaks.
The first problem has quite long explanation, but long story short - when the control is part of a container the OnVisibleChanged event is called only when the control becomes visible. This means that when ToolStripTextBoxControl becomes hidden no event handler will be removed and once it becomes visible again another event handler will be added. The Dispose method will remove the event handler, but it will remove only one event handler and if the control has changed its visible state more than one times the Dispose method will not get rid of the rest of the event handlers.
At the bottom of the page there is a sample code of how to deal with the problem and there are explanations in the blog post on the two possible ways you can use it.
The second problem is related to the VisibleChanged event and ToolStrips - when the Control is disposed the VisibleChanged event will be raised and this can cause several UserPreferencesChanged
event handlers to be added, which will never be removed (the Control is already disposed).
There is a link for that problem in the blog post.
From your explanations it is not clear what fix did you apply, how did you implement the solution in your code, what are your scenario and setup, etc. Therefore it will be best if you provide us with more information. The best will be to send us a runnable sample that exhibits the problem so that we could debug it at our end.
Also as the problem is related to the .NET Framework and not Telerik Reporting it will be very hard to provide a solution that works for everyone - therefore we will take the time needed to address this issue and if there is a proper way to address it in our code we would fix it in a subsequent release.
Regards,
IvanY
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >