---
name: "SDL_DestroyMutex"
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_DestroyMutex"
---

# SDL\_DestroyMutex(3)

Destroy a mutex created with SDL\_CreateMutex ().

## NAME

SDL\_DestroyMutex - Destroy a mutex created with  **SDL\_CreateMutex** ().

## HEADER FILE

Defined in SDL3/SDL\_mutex.h

## SYNOPSIS

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

**void SDL\_DestroyMutex(SDL\_Mutex \*mutex);**

## DESCRIPTION

This function must be called on any mutex that is no longer needed. Failure to destroy a mutex will result in a system memory or resource leak. While it is safe to destroy a mutex that is \_unlocked\_, it is not safe to attempt to destroy a locked mutex, and may result in undefined behavior depending on the platform.

## FUNCTION PARAMETERS

- *mutex*

  the mutex to destroy.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateMutex**(3)](/SDL_CreateMutex/3.md)
