Re: Scope of variables within a FOR EACH ... NEXT LOOP
Tech-Archive recommends: Fix windows errors by optimizing your registry
>Question is ...
>1. Are there any known Performance/Memory issues?
Not by simply declaring them inside the loop. But if you also
initialize the variables, keep in mind that the initialization code
runs on every iteration.
>2. How will garbage collection work in this situation
No difference.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
Please reply only to the newsgroup.
.
Relevant Pages
- Re: Should function argument be changed in function body?
... usually better to initialize a loop variable right before ... length_of_string(const char *s){ ... > (I agree that modifying function parameters is not something ... (comp.lang.c) - Re: ccs compiler with pic12ce674?
... I modified the program to only toggle pin 5. ... You don't initialize it to ... > directive probably set it to 0 and nothing in your loop gets executed. ... > toggleState to TRUE so GP4 gets set high the first time through. ... (comp.arch.embedded) - Re: ATL OOM Resource leaks, and inconsistent behavior?
... I had the call to initialize the redemption object at the ... the initialization code so that it no longer initializes in any loop. ... >> You need the extra AddRef(). ... (microsoft.public.win32.programmer.messaging) - Re: New style DO syntax?
... FOR initialize THEN successor WHILE ... at the beginning of the loop so it shouldn't be there. ... The question is not what Universal Iteration Construct ... (comp.lang.fortran) - Re: ccs compiler with pic12ce674?
... I'm not surprise that you see MCLR high. ... You don't initialize it to anything ... directive probably set it to 0 and nothing in your loop gets executed. ... GP4 to 1 before entering the loop and see if it goes low the first time ... (comp.arch.embedded) |
|