Answer the question
In order to leave comments, you need to log in
Is it correct to create a reference variable in the loop or before the loop?
One of my friends said
It is desirable to declare the object in the smallest possible area.
There is no performance improvement by declaring and creating objects outside of the loop, even if in each loop the object is restored.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question