destroy method

bool destroy()

Free a surface.

It is safe to pass NULL to this function.

\param surface the SDL_Surface to free.

\threadsafety No other thread should be using the surface when it is freed.

\since This function is available since SDL 3.2.0.

\sa SDL_CreateSurface \sa SDL_CreateSurfaceFrom

extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface)

{@category surface}

Implementation

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