---
title: release
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osobject/release
---

# release

Releases the OSObject instance

## Declaration

```occ
virtual void release() const;
```

## Discussion

Discussion Decreases the retain count of the instance by one. If the count is then zero, frees the object.

## See Also

### Managing the Object Lifecycle

- [init](driverkit/osobject/init.md)
- [retain](driverkit/osobject/retain.md)
- [free](driverkit/osobject/free.md)
- [OSObjectPtr](driverkit/osobjectptr.md)
- [OSObjectRef](driverkit/osobjectref.md)
