Unverified Commit 34117e48 authored by Bodmer's avatar Bodmer Committed by GitHub

Merge pull request #475 from lovyan03/master

Add: Destructor of TFT_eSprite.
parents c6faa244 7b71a3d8
...@@ -91,6 +91,16 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames) ...@@ -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 ** Function name: callocSprite
** Description: Allocate a memory area for the Sprite and return pointer ** Description: Allocate a memory area for the Sprite and return pointer
......
...@@ -10,6 +10,7 @@ class TFT_eSprite : public TFT_eSPI { ...@@ -10,6 +10,7 @@ class TFT_eSprite : public TFT_eSPI {
public: public:
TFT_eSprite(TFT_eSPI *tft); TFT_eSprite(TFT_eSPI *tft);
virtual ~TFT_eSprite();
// Create a sprite of width x height pixels, return a pointer to the RAM area // 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 // Sketch can cast returned value to (uint16_t*) for 16 bit depth if needed
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment