#include <QtCore/QCoreApplication>
#include <QThread>
class thread:public QThread
{
protected:
void run();
public:
QChar* xx;
};
void thread::run()
{
xx = new QChar;
}
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
thread th;
th.start();
QThread::yieldCurrentThread();
delete th.xx; // 为什么会在这儿阻塞啊?请高手指点,谢谢!
return getchar();
}