Closed rubensfig closed 2 years ago
The change looks correct, but I failed to reproduce the warning you saw. When I bitbake baseboxd, my log.do_compile does not contain such a warning.
The port_manager is an interface class. The destructor should be implemented by whatever class inherits port_manager.
After looking into it, that explanation is a bit misleading, since port_manager provides a (default) destructor even after tagging it virtual.
The issue with the non-virtual destructor is that implementing classes cannot override the destructor if their destructor needs to do more, and you are destroying it via an interface typed pointer.
So having
port_manager *pm = new tap_manager();
delete pm;
would currently only call the (empty) port_manager destructor, but when tagging it as virtual, it would instead call the tap_manager's destructor.
Rephrase/fix this part of the commit message: this interface cannot not override the destructor
Updated the commit message
and the error is raised.
what error? You only show a warning, not an error. (I think you can just drop this half sentence).
Also you have one ``` to many at the beginning of your quoted error message.
Again updated the commit message
The port_manager is an interface class. The destructor should be implemented by whatever class inherits port_manager.
Avoids the compilation warning
Signed-off-by: Rubens Figueiredo rubens.figueiredo@bisdn.de
Description
Motivation and Context
How Has This Been Tested?