5 ms·
I am not following. Sure you can, sure it may work now, but it seems like something that is a recipe for future bugs being created?
by rileymat2 7y ago
I am not following. Sure you can, sure it may work now, but it seems like something that is a recipe for future bugs being created?
- plorkyeran 7y agoIt only causes problems if you try to delete it via a pointer to the base class. If your base class doesn't have any virtual functions then it's very unlikely that anyone would ever write code which tried to do that anyway, so it's not an issue. A base class with virtual functions but a non-virtual destructor is what'll get you into trouble down the road.