-
-
Notifications
You must be signed in to change notification settings - Fork 885
Closed
Labels
doneWork on this issue is complete. Will be available on next releaseWork on this issue is complete. Will be available on next release
Description
Before opening the issue, have you...?
- Searched for existing issues
- Looked through the wiki
- Updated MonitorControl to the latest version (if applicable)
Describe the bug
In this file https://github.com/MonitorControl/MonitorControl/blob/main/MonitorControl/Support/Arm64DDC.swift (and possibly the intel version), I don't see any CFRelease
/IOObjectRelease
calls, despite the fact that the docs say you must release the iterator and any objects as you iterate through them. But I'm not 100% familiar with swift, does it wrap iokit to take care of these things for you?
Also you should consider using CFSTR
macro instead of CFStringCreateWithCString
for the string constants that are fixed, so that way you avoid any runtime allocation entirely
Note that I have not traced through instruments to see how big of an impact this is
Steps to reproduce
- Read through code
- Notice no cfrelease/ioobject release calls
Expected behavior
- cfrelease/ioobjectrelease calls added as appropriate
Anything else?
No response
Environment Information (please complete the following information)
- macOS Version 12.4
- MacBook Pro (16-inch, 2021
- Apple Silicon: Yes
- Monitor Control versions: Should affect anything that supports m1?
Metadata
Metadata
Assignees
Labels
doneWork on this issue is complete. Will be available on next releaseWork on this issue is complete. Will be available on next release