destroy method
Destroy the specified texture.
Passing NULL or an otherwise invalid texture will set the SDL error message to "Invalid texture".
\param texture the texture to destroy.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_CreateTexture \sa SDL_CreateTextureFromSurface
extern SDL_DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture *texture)
Implementation
bool destroy() {
if (this != nullptr) {
sdlDestroyTexture(this);
return true;
}
return false;
}