3 ms·
The correct way to do this, if it really is a significant simplification, is to factor out the minimal relevant code into a private helper class (or struct) tha
by layer8 4y ago
The correct way to do this, if it really is a significant simplification, is to factor out the minimal relevant code into a private helper class (or struct) that you instantiate anew for each computation. It then functions like a stack frame you can pass around and share between functions/methods, within private boundaries.