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

Documentation on Memory Leak Management/Prevention?

1 Answer 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 13 Aug 2015, 05:18 PM

Are there any blog posts and/or help articles on best practices for managing/preventing memory leaks in the KendoUI library? It seems that for each widget, there is a similar, but different process to remove a widget's elements and event handlers from the DOM. Also, there are things to keep in mind as well such as dataBound/dataBinding when manually attaching/detaching event handlers to DOM elements within the widget. From the number of posts and back-and-forth replies in forums on this topic, it seems clear that there is a lot of confusion.

 

It would be great if there were a central location where all these instructions were located. I don't believe they are available from the API yet (destroy doesn't do full cleanup I don't believe).

 

http://scottsjewels.blogspot.com/2013/03/javascript-memory-leaks-and-kendo-grid.html

http://www.telerik.com/forums/how-to-clean-up-dropdownlist-lists

http://stackoverflow.com/questions/24409819/how-to-remove-all-kendo-dropdownlist-elements-from-document-body-dom

http://www.telerik.com/forums/datepicker-becomes-static​​​​

 

Thanks,

--Ed

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 17 Aug 2015, 10:06 AM
Hello,

Your concerns are perfectly valid. So far we have two help topics that cover them:
Destroy Kendo UI Widgets
Memory Usage Leaks with Kendo UI and AngularJS

More complex interactions like the one with Angular demand some special attention.
Other than that you should only care to:
 - destroying the widget
 - remove or empty the main DOM element
 - drop any references

Anything that requires additional action will be onsidered a bug and will be addressed by us.
Note that some of the linked topics/articles are not up to date and might not reflect the actual state of the code right now.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Ed
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or