API reference / Images and textures
SDL_DestroyTexture
Function, SDL3
Frees a texture. After this call, the texture pointer is not valid.
Declaration
#include <SDL3/SDL.h>
void SDL_DestroyTexture(SDL_Texture *texture);Parameters
texture | The texture. |
Example
SDL_DestroyTexture(ship);See this code run in Load an image. Download the full program (.zip)
Notes
- Free each texture that you replace, or your memory use grows.
In SDL2
The name is the same.