<!--
{
  "availability" : [
    "driverkit: 19.0.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HIDDriverKit",
  "identifier" : "/documentation/HIDDriverKit/IOUserHIDEventService/free",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HIDDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserHIDEventService@F@free#"
  },
  "title" : "free"
}
-->

# free

Performs any final cleanup for the service.

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

## Discussion

Use this method to perform any final cleanup of your event service, such as deallocating memory you allocated. The system calls this method at some point after it calls your service’s [`Stop`](/documentation/HIDDriverKit/IOUserHIDEventService/Stop) method.

Always call `super` at the end of your custom implementation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)