---
title: free
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioservice/free
---

# free

Performs any final cleanup for the service.

## Declaration

```occ
virtual void free();
```

## Mentioned in

Creating a Driver Using the DriverKit SDK

## Discussion

Discussion Use this method to perform any final cleanup of your service, such as deallocating any memory you allocated. The system calls this method at some point after it calls your service’s Stop method. Always call super at the end of your custom implementation.

## See Also

### Running the Service

- [init](driverkit/ioservice/init.md)
- [Start](driverkit/ioservice/start.md)
- [Stop](driverkit/ioservice/stop.md)
