Loops in realtime callbacks
-
Is it ever acceptable?
-
In terms of predictability yes, there‘s nothing in a loop that allocates.
However if your algorithm is mainly based on looping in the realtime callback you might think about another way to achieve the same result.
-
I think I've managed to separate out the logic so the loops are now in a deferred script. I feel clean again
-
@Christoph-Hart said in Loops in realtime callbacks:
there‘s nothing in a loop that allocates.
What about the counter variable in a for loop?
-
nope, still not allocating
It's known at the compilation that the counter will be needed so it's allocated during that phase.