Closed aziogroup closed 9 months ago
Your coroutine is not latent, so you don't get latent this
protection. This is by design and documented.
Thank you for your answer, sorry I did not learn enough. Using ForceLatentCoroutine solved the problem, Thank you! https://github.com/landelare/ue5coro/blob/master/Docs/Async.md
While testing the coroutine, the following code sometimes causes a crash when the PIE is terminated. Also, if you are lucky and it does not crash, it seems that the coroutine continues to run even though the PIE has terminated. It seemed to be no problem if I explicitly called cancel with EndPlay, etc.
You can easily reproduce this by specifying gc.CollectGarbageEveryFrame 1.
Does the coroutine need to explicitly call cancel?
Thank you.