退出时释放USB设备对象
This commit is contained in:
parent
41e0eaacdd
commit
a8eafaf120
|
@ -1242,6 +1242,12 @@ void usb_monitor::quit(void)
|
||||||
{
|
{
|
||||||
PostMessage(wnd_monitor_, WM_QUIT, 0, 0);
|
PostMessage(wnd_monitor_, WM_QUIT, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(lock_);
|
||||||
|
for (auto& v : devices_)
|
||||||
|
v->release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue