diff --git a/api/Print.h b/api/Print.h index 5a19fe78..3621d6e4 100644 --- a/api/Print.h +++ b/api/Print.h @@ -42,6 +42,8 @@ class Print void setWriteError(int err = 1) { write_error = err; } public: Print() : write_error(0) {} + virtual ~Print() {} + int getWriteError() { return write_error; } void clearWriteError() { setWriteError(0); } diff --git a/api/Printable.h b/api/Printable.h index 972866e8..cc45dc3f 100644 --- a/api/Printable.h +++ b/api/Printable.h @@ -33,6 +33,7 @@ class Print; class Printable { public: + virtual ~Printable() {} virtual size_t printTo(Print& p) const = 0; }; diff --git a/api/String.h b/api/String.h index 0bafd35a..fcd29211 100644 --- a/api/String.h +++ b/api/String.h @@ -81,7 +81,7 @@ class String explicit String(unsigned long, unsigned char base=10); explicit String(float, unsigned char decimalPlaces=2); explicit String(double, unsigned char decimalPlaces=2); - ~String(void); + virtual ~String(void); // memory management // return true on success, false on failure (in which case, the string