Function
IOObjectGetRetainCount
Returns kernel retain count of an IOKit object. Identical to IOObjectGetKernelRetainCount() but available prior to Mac OS 10.6.
SDKs
- macOS 10.0+
- Mac Catalyst 13.0+
Return Value
If the object handle is valid, the kernel objects retain count is returned, otherwise zero is returned.
Discussion
This function may be used in diagnostics to determine the current retain count of the kernel object at the kernel level.
See Also
Miscellaneous
IOBSDNameMatching
Create a matching dictionary that specifies an IOService match based on BSD device name.
IOCreateReceivePort
Creates and returns a mach port suitable for receiving IOKit messages of the specified type.
IOMasterPort
Returns the mach port used to initiate communication with IOKit.
IONotificationPortCreate
Creates and returns a notification object for receiving IOKit notifications of new devices or state changes.
IOObjectIsEqualTo
Checks two object handles to see if they represent the same kernel object.
IOObjectRetain
Retains an object handle previously returned by IOKitLib.
IOServiceAddMatchingNotification
Look up registered IOService objects that match a matching dictionary, and install a notification request of new IOServices that match.
IOServiceClose
Close a connection to an IOService and destroy the connect handle.
IOServiceMatching
Create a matching dictionary that specifies an IOService class match.