Skip to content

PivotGrid: T1317109 — fix memory leak after PivotGridDataSource is reassigned#32332

Merged
sjbur merged 17 commits intoDevExpress:26_1from
sjbur:issue-3125_26_1
Feb 12, 2026
Merged

PivotGrid: T1317109 — fix memory leak after PivotGridDataSource is reassigned#32332
sjbur merged 17 commits intoDevExpress:26_1from
sjbur:issue-3125_26_1

Conversation

@sjbur
Copy link
Contributor

@sjbur sjbur commented Jan 28, 2026

No description provided.

@sjbur sjbur self-assigned this Jan 28, 2026
@sjbur sjbur added the 26_1 label Jan 28, 2026
@sjbur sjbur marked this pull request as ready for review January 29, 2026 08:16
@sjbur sjbur requested a review from a team as a code owner January 29, 2026 08:16
Copilot AI review requested due to automatic review settings January 29, 2026 08:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a memory leak issue (T1317109) that occurs when PivotGridDataSource is reassigned. The fix ensures that internal DataSource instances within store objects are properly disposed when the PivotGridDataSource itself is disposed.

Changes:

  • Added dispose() methods to LocalStore, RemoteStore, and XmlaStore classes
  • Modified PivotGridDataSource.dispose() to call the store's dispose method
  • Added tests to verify that LocalStore and RemoteStore dispose their internal DataSource instances
  • Improved code formatting with consistent indentation in data_source.ts

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/dataSource_bundled.tests.js Added two tests to verify that PivotGridDataSource.dispose() properly disposes the internal DataSource in both LocalStore and RemoteStore
packages/devextreme/js/__internal/grids/pivot_grid/xmla_store/m_xmla_store.ts Added empty dispose() method to XmlaStore for interface consistency (XmlaStore doesn't maintain internal DataSource)
packages/devextreme/js/__internal/grids/pivot_grid/remote_store/m_remote_store.ts Added dispose() method that disposes the internal _dataSource using optional chaining for null safety
packages/devextreme/js/__internal/grids/pivot_grid/local_store/m_local_store.ts Added dispose() method that disposes the internal _dataSource using optional chaining for null safety; also removed unnecessary eslint-disable comment
packages/devextreme/js/__internal/grids/pivot_grid/data_source/m_data_source.ts Updated dispose() to call store's dispose method; improved code formatting with consistent indentation

Tucchhaa
Tucchhaa previously approved these changes Jan 30, 2026
@Tucchhaa Tucchhaa self-requested a review February 2, 2026 09:05
This reverts commit 8875a5c.
This reverts commit 45548ad.
@sjbur sjbur marked this pull request as draft February 11, 2026 08:35
@sjbur sjbur marked this pull request as ready for review February 11, 2026 13:52
}

_dispose() {
this._eventsStrategy.fireEvent('disposing', [{ component: this }]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fireEvent('disposing') call is redundant because it's already executed in the [same method] base method (

)


if (that._fieldChooserBase) {
that._fieldChooserBase._dispose();
that._fieldChooserBase = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these nullification assignments (= null;) appear to be unnecessary. I ran the tests and everything works fine without them.

@sjbur sjbur merged commit 538daf7 into DevExpress:26_1 Feb 12, 2026
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants