From af9ec263a1be69548e1ad988800dcad1ecdbe954 Mon Sep 17 00:00:00 2001 From: Tim Ambrogi Date: Thu, 19 May 2022 10:37:00 -0400 Subject: [PATCH] Migrated critical leak bugfix to STL source files. --- include/Task.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/Task.h b/include/Task.h index ce6e214..ebaadf8 100644 --- a/include/Task.h +++ b/include/Task.h @@ -230,7 +230,7 @@ public: AddRef(); } Task(const Task& in_otherTask) /// Copy constructor (TaskHandle/WeakTaskHandle only) - : Task(in_otherTask.GetInternalTask()) + : m_taskInternal(in_otherTask.GetInternalTask()) { static_assert(IsCopyable(), "Cannot copy-construct Task/WeakTask (only TaskHandle/WeakTaskHandle)"); AddRef(); @@ -766,7 +766,6 @@ inline Task<> WaitForAny(std::vector in_entries) } /// Awaiter task that manages a set of other awaiters and waits until all of them are done -COROUTINE_OPTIMIZE_OFF // NOTE: There is a compiler optimization bug in versions of Clang used on some platforms that cause it to crash when compiling this function inline Task<> WaitForAll(std::vector in_entries) { TASK_NAME_ENTRIES_ALL(__FUNCTION__, in_entries); @@ -793,7 +792,6 @@ inline Task<> WaitForAll(std::vector in_entries) co_await Suspend(); } } -COROUTINE_OPTIMIZE_ON /// Awaiter task that behaves like WaitForAny(), but returns a value associated with whichever awaiter finishes first template