Store the API device refcount on the device itself, so if the device is disconnected and we have multiple application references to it, we only free it once.
1 file changed