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

Prevention of deletion of a ModelBuilder through a base class pointer #208

Open
ChristophJud opened this issue Jun 8, 2015 · 0 comments

Comments

@ChristophJud
Copy link
Contributor

I would recommend to add an empty nonvirtual and protected destructor to the ModelBuilder base class to prevent the deletion through a base class pointer.

ModelBuilder *m = PCAModelBuilder::Create();
delete m;

would only call the destructor of ModelBuilder but not the one of PCAModelBuilder. I think, it even leads to undefined behaviour.

Cheers

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

No branches or pull requests

1 participant