fix(test): tasks test memmory leak. don't store local task copy.

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2023-07-05 20:19:22 -07:00
parent 965ee5687a
commit 8638076aa1
No known key found for this signature in database
GPG Key ID: E10E321EB160949B

View File

@ -64,11 +64,9 @@ class BigConcurrentTaskThread : public QThread {
// this number is enough to fill up 16 MiB of stack, more than enough to cause a problem.
static const unsigned s_num_tasks = 1 << 12;
{
auto sub_tasks = std::array<BasicTask::Ptr, s_num_tasks>();
for (unsigned i = 0; i < s_num_tasks; i++) {
auto sub_task = makeShared<BasicTask>(false);
sub_tasks[i] = sub_task;
big_task.addTask(sub_task);
}