This commit addresses several issues in the temperature sensor implementation for ARM Mac:
1. Memory leak caused by unreleased system resources
2. Increasing port counts in Activity Monitor
3. String corruption where the first character becomes "\x00"
Changes:
1. Resource Management:
- Added proper resource cleanup using `defer` statements
- Refactored code to share the HID system client instead of creating new ones
- Fixed memory leaks by ensuring all CoreFoundation objects are properly released
2. String Handling:
- Fixed buffer allocation for string conversion
- Properly handle null terminators in C string to Go string conversion
- Added correct string length calculations
3. Code Structure:
- Reduced resource allocation by sharing system client between functions
- Enhanced code readability with better comments