-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 virtual dtor for PointCloud #3472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, however pcl::RangeImage
is the one that needs a virtual destructor, not pcl::PointCloud
.
To resolve this warning indeed only However, as we have now found out, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since PointCloud
has no virtual methods, I'm struggling to find good practice cases where storing a base pointer to PointCloud
objects, while wanting to address child methods from RangeImage
, would make sense. That being said, if the criteria for adding a virtual dtor is a class having children, then I messed up my review during the destructor removal. I only focused on checking if the class had virtual methods and if any base class to it already defined a virtual dtor.
I agree with your first point. Perhaps we should even evaluate a possibility of "un-deriving" |
I just had a look at the public interface of RangeImage and it looks messy. I wish we could write it from scratch.
|
So maybe we pretend that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. I'll just switch my review to make sure no one merges this as is.
Maybe add final specifier to |
As requested in #3470, a virtual destructor was readded to the PointCloud class.