---
name: "SDL_DestroyRWLock"
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_DestroyRWLock"
---

# SDL\_DestroyRWLock(3)

Destroy a read/write lock created with SDL\_CreateRWLock ().

## NAME

SDL\_DestroyRWLock - Destroy a read/write lock created with  **SDL\_CreateRWLock** ().

## HEADER FILE

Defined in SDL3/SDL\_mutex.h

## SYNOPSIS

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

**void SDL\_DestroyRWLock(SDL\_RWLock \*rwlock);**

## DESCRIPTION

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

## FUNCTION PARAMETERS

- *rwlock*

  the rwlock to destroy.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateRWLock**(3)](/SDL_CreateRWLock/3.md)
