Skip to content

Commit e4d4c11

Browse files
committed
Inheritence corrections for ESPressio Base
1 parent aaadd9f commit e4d4c11

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ESPressio_IThread.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ namespace ESPressio {
2929
*/
3030
class IThread : public Object<IThread> {
3131
public:
32+
// Destructor
33+
34+
/// The Destructor is declared as `virtual` to ensure that the correct destructor is called when a derived class is destroyed.
35+
virtual ~IThread() {
36+
DoNotifyDestroy();
37+
}
3238
// Methods
3339

3440
/// `Initialize` is invoked automatically for all Threads when the `ThreadManager` is initialized in your `main()` (or `setup()` for MCU projects) function.

0 commit comments

Comments
 (0)