-
Notifications
You must be signed in to change notification settings - Fork 202
ORCA: Fix memory leak in CWindowOids by adding destructor #1533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 in the CWindowOids class by adding a destructor that properly releases three CMDIdGPDB objects that were allocated in the constructor but never freed.
Changes:
- Added destructor to
CWindowOidsclass that releases the three ownedIMDIdpointers - Properly declared the destructor as
overridesinceCWindowOidsinherits fromCRefCount
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/backend/gporca/libgpopt/include/gpopt/base/CWindowOids.h | Declares the destructor as virtual override |
| src/backend/gporca/libgpopt/src/base/CWindowOids.cpp | Implements the destructor to release the three MDId member pointers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
leborchuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber, m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but never released. Fixes ORCA unit test failures: - gporca_test_CXformTest - gporca_test_CConstExprEvaluatorDefaultTest
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ff17a28 to
c0dc483
Compare
* ORCA: Fix memory leak in CWindowOids by adding destructor CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber, m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but never released. Fixes ORCA unit test failures: - gporca_test_CXformTest - gporca_test_CConstExprEvaluatorDefaultTest
* ORCA: Fix memory leak in CWindowOids by adding destructor CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber, m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but never released. Fixes ORCA unit test failures: - gporca_test_CXformTest - gporca_test_CConstExprEvaluatorDefaultTest
* ORCA: Fix memory leak in CWindowOids by adding destructor CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber, m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but never released. Fixes ORCA unit test failures: - gporca_test_CXformTest - gporca_test_CConstExprEvaluatorDefaultTest
CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber, m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but never released.
Fixes ORCA unit test failures:
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions