修复登出设备连接释放资源bug
This commit is contained in:
parent
d3f1af9b8b
commit
ad8c4c8674
@ -378,7 +378,7 @@ namespace Assets.Scripts.Ble
|
||||
{
|
||||
pCache.Clear();
|
||||
_discoveredCallback = discoveredCallBack;
|
||||
bleMobileThread.StartWatcher();
|
||||
bleMobileThread?.StartWatcher();
|
||||
}
|
||||
|
||||
public void StopScan()
|
||||
@ -457,12 +457,10 @@ namespace Assets.Scripts.Ble
|
||||
{
|
||||
if (bleMobileThread == null)
|
||||
return;
|
||||
bleMobileThread.ManagerInitialized -= BleMobileThread_ManagerInitialized;
|
||||
bleMobileThread.ManagerStatusChanged -= ManagerStatusChanged;
|
||||
bleMobileThread.ScanInfoReceived -= WatcherScanInfoReceived;
|
||||
//bleMobileThread.ManagerInitialized -= BleMobileThread_ManagerInitialized;
|
||||
//bleMobileThread.ManagerStatusChanged -= ManagerStatusChanged;
|
||||
//bleMobileThread.ScanInfoReceived -= WatcherScanInfoReceived;
|
||||
bleMobileThread.Dispose();
|
||||
bleMobileThread = null;
|
||||
hwInterface = null;
|
||||
pCache.Clear();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user