---
title: OSSafeReleaseNULL
framework: driverkit
role: symbol
role_heading: Macro
path: driverkit/ossafereleasenull
---

# OSSafeReleaseNULL

Frees memory that you allocated for a named class.

## Declaration

```occ
#define OSSafeReleaseNULL(inst)
```

## Parameters

- `inst`: The object that you want to free. After freeing the memory, the macro sets the value of inst to NULL.

## Discussion

Discussion Use this macro to free memory that you allocated OSTypeAlloc. If inst is NULL, this macro doesn’t attempt to free the memory.

## See Also

### Deallocation

- [IODelete](driverkit/iodelete.md)
- [IOSafeDeleteNULL](driverkit/iosafedeletenull.md)
- [IOFree](driverkit/iofree.md)
