---
title: free
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15+]
path: kernel/ioservice/3180716-free
---

# free

Performs any final cleanup for the service.

## Declaration

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

## 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](kernel/ioservice/3180717-init.md)
- [Start](kernel/ioservice/3180710-start.md)
- [Stop](kernel/ioservice/3180713-stop.md)
