Skip to content

Dispose random view selectors#217

Draft
zayenz wants to merge 1 commit into
mainfrom
feature/int-var-rnd-dispose
Draft

Dispose random view selectors#217
zayenz wants to merge 1 commit into
mainfrom
feature/int-var-rnd-dispose

Conversation

@zayenz

@zayenz zayenz commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Add notice() and dispose() to the random view selector so its Rnd handle is destroyed when branchers are discarded.
  • Mirror the existing random value selector resource-management pattern.
  • Add a changelog entry thanking @k0stjap.

Fixes #62.

Validation

  • cmake -S . -B /tmp/gecode-int-var-rnd-dispose-build -DCMAKE_BUILD_TYPE=Debug -DGECODE_ENABLE_EXAMPLES=OFF -DGECODE_ENABLE_GIST=OFF -DGECODE_ENABLE_QT=OFF
  • cmake --build /tmp/gecode-int-var-rnd-dispose-build --target gecode-test -j 8
  • /tmp/gecode-int-var-rnd-dispose-build/bin/gecode-test -iter 1 -test ^Int::Branch::Dense::3
  • /tmp/gecode-int-var-rnd-dispose-build/bin/gecode-test -iter 1 -test ^Int::Branch::Sparse::3
  • git diff --check

Note: I also started the full Int::Branch family, observed passing progress, and stopped it because it was too broad for this resource-management fix.

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.

1 participant