destroy method

bool destroy()

Destroy the rendering context for a window and free all associated textures.

This should be called before destroying the associated window.

\param renderer the rendering context.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_CreateRenderer

extern SDL_DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer *renderer)

Implementation

bool destroy() {
  if (this != nullptr) {
    sdlDestroyRenderer(this);
    return true;
  }
  return false;
}