EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
September 13, 2025, 07:34:08 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
How to destroy treeGrid component
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to destroy treeGrid component (Read 11037 times)
amir-t
Newbie
Posts: 48
How to destroy treeGrid component
«
on:
August 06, 2014, 10:10:00 AM »
Hi,
i'm using Tree-grid in chrome browser.
In our page, we're using a
dynamic panel
which can switch between views of
treeGrids
.
We noticed that we have a serious problem of memory leaks -
After we created many views of treeGrid (where each new view in our manager panel creates a new instance of the TreeGrid component)
and then removing all the existing views, the memory usage of the chrome process is not released and gets higher even more when we create & remove another views afterward.
Our need is to dispose and destroy the TreeGrid component when removing or changing a TreeGrid view.
How can we destroy all the treeGrid's related DOM components and all its inner objects (columns, rows, editors, headers etc..)
and to avoid from memory leaks or undisopsed treeGrid's inner objects\components?
Thanks in advance.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: How to destroy treeGrid component
«
Reply #1 on:
August 06, 2014, 07:53:31 PM »
Please try the code below to destroy a treegrid component.
Code:
$('#tg').treegrid('getPanel').panel('destroy');
Logged
amir-t
Newbie
Posts: 48
Re: How to destroy treeGrid component
«
Reply #2 on:
August 12, 2014, 02:10:14 AM »
Hi, thanks a lot for your reply.
I've tried the above code, it indeed removed the treegrid's panel and inner divs from the DOM,
but for some reason the tab process's memory usage still growing on every creation\removal view of treeGrid.
We tried to create treeGrid and destroy it directly 10 times, and in each iteration the memory just got bigger as like the previous treeGrid's resources weren't destroyed nor released from the memory.
Is the above code (panel destroy) supposed to remove all the inner objects and resources of the treeGrid from memory?
Is there some 'jsfiddle' example of destroying treeGrid where we can test and monitor the memory leaks problem and make sure the above code works properly?
Thanks in advance.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...