Skip to content
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

Upgrade SWIG from version 4.0.2 to version 4.1.0 or higher, please! #4536

Closed
N-Dekker opened this issue Mar 26, 2024 · 1 comment · Fixed by #4541
Closed

Upgrade SWIG from version 4.0.2 to version 4.1.0 or higher, please! #4536

N-Dekker opened this issue Mar 26, 2024 · 1 comment · Fixed by #4541
Assignees
Labels
type:Enhancement Improvement of existing methods or implementation
Milestone

Comments

@N-Dekker
Copy link
Contributor

N-Dekker commented Mar 26, 2024

set(swig_version_min 4.0.2)
set(ITK_SWIG_VERSION 4.0.2)

std::unique_ptr is an essential utility to prevent memory leaks, as well as multiple delete's on one pointer (which would cause undefined behavior, possibly leading to crashes). It is also useful as function parameter type, to indicate that the function takes ownership of the object that is passed as argument.

SWIG 4.1.0 (released in 2022) appears to be the first version to support std::unique_ptr: https://sourceforge.net/p/swig/news/2022/10/swig-410-released/

The most recent release is version 4.2.1. That version appears to have even more modern C++ support: https://swig.org

Can you please upgrade SWIG? At least to version 4.1.0, but the latest version appears even better 😃


For the record, SimpleITK is currently at SWIG version 4.1.1: https://github.com/SimpleITK/SimpleITK/blob/8e29d4902cdbc91b03578fa654b06d868b08f03c/SuperBuild/External_Swig.cmake#L22

@N-Dekker N-Dekker added the type:Enhancement Improvement of existing methods or implementation label Mar 26, 2024
Copy link

Thank you for contributing an issue! 🙏

Welcome to the ITK community! 🤗👋☀️

We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜
Also, please check existing open issues and consider discussion on the ITK Discourse. 📖

This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Enhancement Improvement of existing methods or implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants