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

Dynamically created tabs containing Kendo grids not releasing memory on removal

1 Answer 13 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Murray
Top achievements
Rank 1
Iron
Veteran
Murray asked on 04 Nov 2019, 05:41 PM

In my app I dynamically create angular material tabs, which each contain a kendo grid. 

 

The problem is when a tab is closed, by clicking on the X in its header, the memory isn't garbage collected. I am implementing ngOnDestroy in my dynamic components and observable subscriptions are cleaned up here. I am also calling ComponentRef.destroy() to ensure the component is destroyed and can confirm ngOnDestroy() is getting called in the dynamically created copmonents. However the memory from the destroyed component isn't being released.

 

Is there any special cleanup required by Kendo Grid to release memory? Please advise.

 

Thank you.

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 06 Nov 2019, 11:50 AM

Hi Murray,

From the provided information I understand that Angular Material tabs are used. If that is the case, we are unsure of why the reported behavior occurs as the Angular Material library has its own documentation and dedicated support. Please check with them.

About the Grid, there is nothing specific that should be done in order to clean the used memory once the Grid is destroyed. That is why, I would suggest to try using the Kendo UI for Angular TabStrip component instead and see if the issue persists. It provides a boolean [keepTabContent] property that is  set to false by default. It ensures that the contents of the inactive tabs aren't persisted in the DOM.

I hope this helps. Please let me know your feedback on the provided information. Thank you in advance.

Regards,
Svetlin
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Murray
Top achievements
Rank 1
Iron
Veteran
Answers by
Svet
Telerik team
Share this question
or