Qt5.12.12 with msvc 2017 x64. I create a QThreadStorage object at the beginning of my app, when I close my app, it crashs. After debug, I find it is caused by double free of the data in QThreadStorage. Here is my code. Am I use it wrong?
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QThreadStorage<QString> data;
data.setLocalData("TEst");
QMainWindow window;
window.show();
return a.exec();
}
And here is error information and trace stack.