destroy method

bool destroy()

Destroy a window.

Any child windows owned by the window will be recursively destroyed as well.

Note that on some platforms, the visible window may not actually be removed from the screen until the SDL event loop is pumped again, even though the SDL_Window is no longer valid after this call.

\param window the window to destroy.

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

\since This function is available since SDL 3.2.0.

\sa SDL_CreatePopupWindow \sa SDL_CreateWindow \sa SDL_CreateWindowWithProperties

extern SDL_DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window *window)

{@category video}

Implementation

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