Add: TFT_eSprite destructor.

This commit is contained in:
lovyan03
2019-11-21 15:19:33 +09:00
parent c6faa24494
commit 7b71a3d8b5
2 changed files with 11 additions and 0 deletions

View File

@@ -91,6 +91,16 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
}
/***************************************************************************************
** Function name: ~TFT_eSprite
** Description: Class destructor
*************************************************************************************x*/
TFT_eSprite::~TFT_eSprite()
{
deleteSprite();
}
/***************************************************************************************
** Function name: callocSprite
** Description: Allocate a memory area for the Sprite and return pointer

View File

@@ -10,6 +10,7 @@ class TFT_eSprite : public TFT_eSPI {
public:
TFT_eSprite(TFT_eSPI *tft);
virtual ~TFT_eSprite();
// Create a sprite of width x height pixels, return a pointer to the RAM area
// Sketch can cast returned value to (uint16_t*) for 16 bit depth if needed