fix(test): task test memory leak *again*
- put Big thread on the stack so stack will clean it up. Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
4dbcedd03f
commit
965ee5687a
@ -252,16 +252,15 @@ class TaskTest : public QObject {
|
|||||||
{
|
{
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
|
|
||||||
auto thread = new BigConcurrentTaskThread;
|
BigConcurrentTaskThread thread{};
|
||||||
|
|
||||||
connect(thread, &BigConcurrentTaskThread::finished, &loop, &QEventLoop::quit);
|
connect(&thread, &BigConcurrentTaskThread::finished, &loop, &QEventLoop::quit);
|
||||||
|
|
||||||
thread->start();
|
thread.start();
|
||||||
|
|
||||||
loop.exec();
|
loop.exec();
|
||||||
|
|
||||||
QVERIFY(!thread->passed_the_deadline);
|
QVERIFY(!thread.passed_the_deadline);
|
||||||
thread->deleteLater();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user