Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 691d297

Browse files
authored
Fix a memory leak issue due to StaticTaskQueueFactory (#896)
1 parent ca50f80 commit 691d297

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/core/rtc_adapter/thread/StaticTaskQueueFactory.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ class QueuedTaskProxy : public webrtc::QueuedTask {
3636
{
3737
if (auto owner = m_owner.lock()) {
3838
// Only run when owner exists
39-
return m_task->Run();
39+
QueuedTask* raw = m_task.release();
40+
if (raw->Run()) {
41+
delete raw;
42+
}
4043
}
4144
return true;
4245
}

0 commit comments

Comments
 (0)