It is indeed a weird situation. A few days ago there was another thread which showed that using a local variable was indeed faster, then anything.
Here we have a situation where using local variable is memory efficient. Some one from Ni should chime in.
Here is what I have noticed. If you change the vi Say remove the loacl Variable and save it. Dont Run it and check what the Memory Usage is. It is to the order of 8M which is correct.
What I also did is went to Tools->Advanced->Buffer Allocations And Selected Only Arrays. Then clicked refresh. This puts a Black dot on every place Buffer is allocated. It flashes when refreshed.
Well, Witout the local variable, Buffer is allocated at the Data In, Shift Register and Data Out ie 3 places. With the local Variable the buffer allocation is only at 2 places, the local Varable and Data In terminal. What's going on. By Wiring the input of shift register, I think LV uses the Data Out memory space for Shift register. And saves on One buffer and I beleive Local Variable is only a Pointer to the Data Out terminal
All this is conjecture, the other puzzling thing is memory Usage in Vi Properties which does not match the ctaul memory that should be allocated. May be it is calculating erroneously?
Good Luck!
Mache