ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
2.02k stars 640 forks source link

OLEDDisplay.h should have a virtual destructor #143

Closed TD-er closed 4 years ago

TD-er commented 7 years ago

To allow for more dynamic usage of the library and allow to switch between types, one would create a pointer to the base class (OLEDDisplay) and create a new instance of the object (e.g. SSD1306Wire). When the object is deleted, only the base class will be deleted unless the destructor is declared virtual.

So a quick fix would be to add the following line to OLEDDisplay.h: virtual ~OLEDDisplay() {}

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.