M
Michael Moreno
Hello,
Would you know what is best practice please between say:
CODE 1:
TimeSpan ts;
for (i=0; i<1000; i++)
{
ts = ...;
blablabla;
}
and
CODE 2:
for (i=0; i<1000; i++)
{
TimeSpan ts = ...;
blablabla;
}
It seems to me they may both impact differently on the GC.
Clearly, I used a timeSpan but it could be anything else.
What do you think is best?
does the GC behaves the same way in both cases?
Thanks.
Would you know what is best practice please between say:
CODE 1:
TimeSpan ts;
for (i=0; i<1000; i++)
{
ts = ...;
blablabla;
}
and
CODE 2:
for (i=0; i<1000; i++)
{
TimeSpan ts = ...;
blablabla;
}
It seems to me they may both impact differently on the GC.
Clearly, I used a timeSpan but it could be anything else.
What do you think is best?
does the GC behaves the same way in both cases?
Thanks.