---
name: "SDL_FreeSurface"
section: "3"
platform: "linux"
package: "libsdl1.2-dev"
version: "1.2.15+dfsg2-8"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_FreeSurface"
---

# SDL\_FreeSurface(3)

Frees (deletes) a SDL\_Surface

## NAME

SDL\_FreeSurface - Frees (deletes) a SDL\_Surface

## SYNOPSIS

**#include "SDL.h"**

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

## DESCRIPTION

Frees the resources used by a previously created **SDL\_Surface**. If the surface was created using *SDL\_CreateRGBSurfaceFrom* then the pixel data is not freed.

## SEE ALSO

**SDL\_CreateRGBSurface** **SDL\_CreateRGBSurfaceFrom**
