Skip to content

defer delete converted strings in the tests in Raindrops#188

Merged
rmonnet merged 2 commits intoexercism:mainfrom
0riginaln0:patch-3
Apr 8, 2026
Merged

defer delete converted strings in the tests in Raindrops#188
rmonnet merged 2 commits intoexercism:mainfrom
0riginaln0:patch-3

Conversation

@0riginaln0
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@0riginaln0
Copy link
Copy Markdown
Contributor Author

closes #186

Copy link
Copy Markdown
Contributor

@rmonnet rmonnet left a comment

Choose a reason for hiding this comment

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

I concur with the change, the caller should be responsible for cleaning up the allocated string. But additional changes are required.

  1. The .meta/example.odin file needs to be modified so it doesn't delete the strings.Builder variable containing the returned string.
  2. An additional docs/instructions.append.md file must be created to explain that the responsibility to clean up the generated string memory belongs to the caller. (a couple of lines is all that is needed, look at the forth exercise for an example of format for this file).

Please make the requested changes and resubmit.

@rmonnet rmonnet added x:action/improve Improve existing functionality/content x:type/content Work on content (e.g. exercises, concepts) labels Apr 7, 2026
Copy link
Copy Markdown
Contributor

@rmonnet rmonnet left a comment

Choose a reason for hiding this comment

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

Latest commit looks good, merging now.

@rmonnet rmonnet merged commit 15bb00c into exercism:main Apr 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:action/improve Improve existing functionality/content x:type/content Work on content (e.g. exercises, concepts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants