Skip to content

Fix m_schar_array2 leak in test support code#227

Merged
vgvassilev merged 1 commit into
compiler-research:masterfrom
conrade-ctc:pr/datatypes-leak
Jun 13, 2026
Merged

Fix m_schar_array2 leak in test support code#227
vgvassilev merged 1 commit into
compiler-research:masterfrom
conrade-ctc:pr/datatypes-leak

Conversation

@conrade-ctc

Copy link
Copy Markdown

destroy_arrays() deletes every 2D test array except m_schar_array2, which is allocated alongside them in the ctor. Add the missing delete[].

🤖 Done with the help of Claude Code (Claude Opus 4.8)

m_schar_array2 is new[]-allocated in the constructor alongside every
other *_array2 member but was the only one missing a matching delete[]
in destroy_arrays(), leaking N signed-char elements on every
CppyyTestData destruction that called destroy_arrays with m_owns_arrays
set. Also add missing newline at EOF.

Co-developed-with-the-help-of: Claude Code (Claude Opus 4.8)
@conrade-ctc

Copy link
Copy Markdown
Author

@aaronj0 @Vipul-Cariappa, :easy_button: one, just a missing delete (which isn't exercised, but I've had sitting in my forks just in case, thought it was a good time to push up)

@vgvassilev vgvassilev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@vgvassilev vgvassilev merged commit 1eef030 into compiler-research:master Jun 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants