canvas-datagrid
canvas-datagrid copied to clipboard
refresh data cause memory leak
Expected behavior and actual behavior.
refresh same data cause memory become larger and larger
Steps to reproduce the problem.
Specifications like the version of the project, operating system, or hardware.
version: 0.25.4 operating system: chrome 88 macos
self.dispose = function () {
...
if (self.observer && self.observer.disconnect) {
self.observer.disconnect();
}
}
after grid dispose, self.observer
always return undefine, so MutationObserver can't disconnect
Thank you for the report, @javahuang ! As our time is limited, if you see any opportunity to provide a fix , we'd greatly appreciate it!
hi,I want to know how to fix this bug,could you give me some method of fixing this. I also found memory leak, which I wonder if the bug have cause this situation. i found many listeners,and calling dispose() didn't reduce the number of listeners
thank you
Memory leaks are caused by lingering references to data. This can be in the form of event listeners or functions that touched the data to alter order etc..
Using the heap inspector in chrome's performance dev tools can help shine a light on these refs. That's where I would start.