#include <mutex>
class CTest
{
public:
~CTest()
{
std::lock_guard<std::mutex> lock(mutex_); //here
}
private:
std::mutex mutex_;
};
CTest TT;
int main(void)
{
while (1)
{
}
system("pause");
return 0;
}
When I run it, I choose to close the console window, causing std::mutex to throw an exception.
0xC000000D: An invalid parameter was passed to a service or function.
environment: msvc 2013 debug x64
Please advise. tks.
User contributions licensed under CC BY-SA 3.0