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

Scripting: Add first-class support for "factory" method #4205

Open
slicerbot opened this issue Mar 13, 2020 · 2 comments
Open

Scripting: Add first-class support for "factory" method #4205

slicerbot opened this issue Mar 13, 2020 · 2 comments
Assignees
Milestone

Comments

@slicerbot
Copy link
Collaborator

@slicerbot slicerbot commented Mar 13, 2020

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.

@slicerbot slicerbot added this to the Slicer 4.11.0 milestone Mar 13, 2020
@lassoan

This comment has been minimized.

Copy link
Contributor

@lassoan lassoan commented Mar 26, 2020

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.

@jcfr @pieper @cpinter @Sunderlandkyl @fedorov what do you think?

@lassoan lassoan self-assigned this Mar 26, 2020
@pieper

This comment has been minimized.

Copy link
Member

@pieper pieper commented Mar 26, 2020

Yes, makes sense to do the breaking change now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.