PivotGrid: T1317109 — fix memory leak after PivotGridDataSource is reassigned#32332
Merged
sjbur merged 17 commits intoDevExpress:26_1from Feb 12, 2026
Merged
PivotGrid: T1317109 — fix memory leak after PivotGridDataSource is reassigned#32332sjbur merged 17 commits intoDevExpress:26_1from
sjbur merged 17 commits intoDevExpress:26_1from
Conversation
This reverts commit 8c3e610.
Contributor
There was a problem hiding this comment.
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 |
packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/dataSource_bundled.tests.js
Outdated
Show resolved
Hide resolved
Tucchhaa
previously approved these changes
Jan 30, 2026
aleksei-semikozov
previously approved these changes
Feb 11, 2026
| } | ||
|
|
||
| _dispose() { | ||
| this._eventsStrategy.fireEvent('disposing', [{ component: this }]); |
Contributor
There was a problem hiding this comment.
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; |
Contributor
There was a problem hiding this comment.
All these nullification assignments (= null;) appear to be unnecessary. I ran the tests and everything works fine without them.
aleksei-semikozov
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.