Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | sunDalik |
So I have an asynchronous function that looks like this
public async void SomeFunction()
{
entity.MoveToPosition(position)
await ToSignal(entity, "move_completed");
// Run some other code
}
The question is: What will happen if the entity gets freed before it emits move_completed signal? Will the coroutine just get stuck in memory? Will it run the code after? Will it get freed immediately?
If it will stay in memory what can I do to prevent it?