Contents

IOObjectGetRetainCount(_:)

Returns kernel retain count of an IOKit object. Identical to IOObjectGetKernelRetainCount() but available prior to Mac OS 10.6.

Declaration

func IOObjectGetRetainCount(_ object: io_object_t) -> UInt32

Parameters

  • object:

    An IOKit object.

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