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

# SDL\_CleanupPropertyCallback(3type)

A callback used to free resources when a property is deleted.

## NAME

SDL\_CleanupPropertyCallback - A callback used to free resources when a property is deleted.

## HEADER FILE

Defined in SDL3/SDL\_properties.h

## SYNOPSIS

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

**typedef void (SDLCALL \*SDL\_CleanupPropertyCallback)(void \*userdata, void \*value);**

## DESCRIPTION

This should release any resources associated with **value** that are no longer needed.

This callback is set per-property. Different properties in the same group can have different cleanup callbacks.

This callback will be called \_during\_

**SDL\_SetPointerPropertyWithCleanup**\
  if the function fails for any reason.

## FUNCTION PARAMETERS

- *userdata*

  an app-defined pointer passed to the callback.

- *value*

  the pointer assigned to the property to clean up.

## THREAD SAFETY

This callback may fire without any locks held; if this is a concern, the app should provide its own locking.

## AVAILABILITY

This datatype is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetPointerPropertyWithCleanup**(3)](/SDL_SetPointerPropertyWithCleanup/3.md)
