c# - Will a return inside of a for loop leak memory? -


Basically everyone should know that any return inside the for loop will be due to C # in the memory leak.

/ P>

 for  (int i = 0; i   

Generally I will not write code like this but I was wondering what would happen if I had done it.

No, it will not leak memory.

Comments