This project is read-only.
1
Vote

BUG in DiscoverAllDevices() - Missing Marshal.FreeHGlobal()

description

There is a bug in ServiceAndDeviceDiscovery.BluetoothDeviceServicesManager.DiscoverAllDevices()
 
The "while (0 == result)" loop should contain the following line at the end of the loop:
 
Marshal.FreeHGlobal(bufferPtr);
 
I have seen instances where you eventually run out of memory when calling this method a lot.

comments