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

Thanks for the investigation I assigned to PrimeTek to review.

melloware avatar Sep 15 '24 11:09 melloware

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Sep 11 '25 01:09 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

github-actions[bot] avatar Sep 19 '25 01:09 github-actions[bot]