Merge pull request #475 from lovyan03/master

Add: Destructor of TFT_eSprite.
This commit is contained in:
Bodmer
2019-11-26 19:10:27 +00:00
committed by GitHub
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