[Mac] Do not call CFRelease on HID properties
HID properties are callee-owned and should not be released by the caller. Fixes crash (memory corruption) on device hot plugging.
This commit is contained in:
parent
02c9f471ea
commit
05af21e61b
1 changed files with 0 additions and 1 deletions
|
@ -408,7 +408,6 @@ namespace OpenTK.Platform.MacOS
|
|||
|
||||
CFStringRef name_ref = NativeMethods.IOHIDDeviceGetProperty(device, NativeMethods.IOHIDProductKey);
|
||||
string name = CF.CFStringGetCString(name_ref);
|
||||
CF.CFRelease(name_ref);
|
||||
|
||||
List<int> button_elements = new List<int>();
|
||||
CFArray element_array = new CFArray(element_array_ref);
|
||||
|
|
Loading…
Reference in a new issue