primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable Virtual Scroll: Memory leak when data updated continuously

Open Flow3rboy opened this issue 1 year ago • 1 comments

Describe the bug

 var viewInit = function viewInit() {
    if (elementRef.current && DomHandler.isVisible(elementRef.current)) {
      setContentElement(_contentRef.current);
      init();
      // bindWindowResizeListener();
      // bindOrientationChangeListener();
      defaultWidth.current = DomHandler.getWidth(elementRef.current);
      defaultHeight.current = DomHandler.getHeight(elementRef.current);
      defaultContentWidth.current = DomHandler.getWidth(_contentRef.current);
      defaultContentHeight.current = DomHandler.getHeight(_contentRef.current);
    }
  };

when I comment bindWindowResizeListener and bindOrientationChangeListener fix memory leak problem

Reproducer

No response

System Information

"primereact": "10.7.0",
"react": "^18.2.0",

Steps to reproduce the behavior

No response

Expected behavior

No response

Flow3rboy avatar Sep 15 '24 08:09 Flow3rboy