Closed fredlcore closed 2 years ago
When deleteing an EthernetClient object, the compiler throws the following warning: warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor] Adding a virtual destructor solves this problem, see also here: https://stackoverflow.com/questions/43282826/suppress-delete-non-virtual-dtor-warning-when-using-a-protected-non-virtual-dest
delete
warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
When
delete
ing an EthernetClient object, the compiler throws the following warning:warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
Adding a virtual destructor solves this problem, see also here: https://stackoverflow.com/questions/43282826/suppress-delete-non-virtual-dtor-warning-when-using-a-protected-non-virtual-dest