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

Added a virtual destructor to Sampler #2000

Conversation

SomeAlphabetGuy
Copy link
Contributor

Any superclass that has virtual methods should also have a virtual destructor, otherwise there's a risk of undefined behavior (if an object of a subclass is deleted through a pointer to the superclass).

Any superclass that has virtual methods should also have a virtual destructor, otherwise there's a risk of undefined behavior (if an object of a subclass is deleted through a pointer to the superclass).
@ahojnnes
Copy link
Contributor

ahojnnes commented Jul 5, 2023

Thanks, good catch. Need to figure out why clang-tidy doesn't catch this one.

@ahojnnes ahojnnes merged commit 7ab7aa9 into colmap:dev Jul 5, 2023
11 checks passed
@ahojnnes
Copy link
Contributor

ahojnnes commented Jul 5, 2023

Shouldn't happen again: #2001

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.

None yet

2 participants