3 ms·
It seems like you could just ban that. Defers aren't typically used within loops, so why support it?
by skybrian 5y ago
It seems like you could just ban that. Defers aren't typically used within loops, so why support it?
- clysmic 5y agoSure they are, if there is something that is being acquired at the start of the loop and needs to get released at the end...
- skybrian 5y ago...of the function? You could append to a slice, after setting up a defer to free everything in the slice. ...of the loop? Call a function.
- meithecatte 5y ago...or just make defer run at the end of the scope.