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

RadAutoCompleteBox - Memory leak?

1 Answer 10 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 15 May 2014, 01:15 PM
Hello,

I looked with JustTrace for memory leaks in my application and found that the RadAutoCompleteBox still holds an Reference to SizeChanged of the RadWaterMarkTextBox.

I assume the textboxpart needs to remove the SizeChanged Eventhandler on Dispose() of the RadAutoCompleteBox and everything would be ok.
Something like this:

public void Dispose()
{
this.autoCompleteHelper = null;

if (this.textBoxPart != null)
{
this.textBoxPart.SizeChanged -= this.OnTextBoxPartSizeChanged;
this.textBoxPart.WatermarkContent = null;
this.textBoxPart.Loaded -= this.OnTextBoxPartLoaded;
this.textBoxPart = null;
}
}


1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 16 May 2014, 11:45 AM
Hello Matthias,

Thank you for contacting us.

We are not aware of any memory leak issues in the current version of RadAutoCmpleteBox. Indeed the mentioned SizeChanged event is not detached but even so after profiling the control there where no memory leak issues detected.

I recorded a short video showing how profiling the current version of the control leads to no unexpected behavior and no Rad... instances are left alive. You can also find the test project in which we tested the issue attached to my response. Please let us know if we missed something.

Regards,
Vladi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
AutoCompleteBox
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or