Closed TD-er closed 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.
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.
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() {}