---
name: "SDL_DestroySurface"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_DestroySurface"
---

# SDL\_DestroySurface(3)

Free a surface.

## NAME

SDL\_DestroySurface - Free a surface.

## HEADER FILE

Defined in SDL3/SDL\_surface.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void SDL\_DestroySurface(SDL\_Surface \*surface);**

## DESCRIPTION

It is safe to pass NULL to this function.

## FUNCTION PARAMETERS

- *surface*

  the  **SDL\_Surface**\
    to free.

## THREAD SAFETY

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

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateSurface**(3)](/SDL_CreateSurface/3.md), **•**(3), [**SDL\_CreateSurfaceFrom**(3)](/SDL_CreateSurfaceFrom/3.md)
