kendo-labs / angular-kendo

A project to create a robust set of Angular.js bindings for Kendo UI widgets
474 stars 209 forks source link

Keeping the widgets in the scope #392

Open YonatanKra opened 10 years ago

YonatanKra commented 10 years ago

Hi, One "good practice" in angularjs is not to keep DOM elements in the scope. This might result in memory leaks. When I'm doing this: <div kendo-grid="grid"></div> I'm actually getting the object grid in my scope, and in turn, grid.element, which references to a DOM element. Am I right in this? Can this be a reason for memory leaks? If so, how can one avoid it and what would be the best practice in releasing the DOM element? Or maybe you take care of it in the directive itself?