Chore (macOS): refactors code for better resource management

This commit is contained in:
李通洲
2025-10-13 14:27:23 +08:00
parent 98a65966e7
commit 4b517263d0
3 changed files with 32 additions and 49 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ static const char* detectFrequency(FFCPUResult* cpu)
FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IOServiceGetMatchingService(MACH_PORT_NULL, IOServiceNameMatching("pmgr"));
if (!entryDevice)
return "IOServiceGetMatchingServices() failed";
return "IOServiceGetMatchingService() failed";
if (!IOObjectConformsTo(entryDevice, "AppleARMIODevice"))
return "\"pmgr\" should conform to \"AppleARMIODevice\"";