Releases an object handle previously returned by IOKitLib.
SDKs
- macOS 10.0+
- Mac Catalyst 13.0+
Framework
- IOKit
Declaration
kern _return _t IOObjectRelease(io _object _t object);
Parameters
object
The IOKit object to release.
Return Value
A kern_return_t error code.
Discussion
All objects returned by IOKitLib should be released with this function when access to them is no longer needed. Using the object after it has been released may or may not return an error, depending on how many references the task has to the same object in the kernel.