Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Scripting: Add first-class support for "factory" method #4205
VTK_NEWINSTANCE macro is available in Slicer's VTK version, so we could mark factory methods return object instance that does not require "UnRegister".
There are only 13 Python files in Slicer core that would need to be updated, so that's very easy.
Probably a number of extensions are impacted as well, which is not very nice (the extra UnRegister will cause Slicer to crash), but Slicer5 would be a good opportunity for making a breaking change like this.