LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory leakage?

One more thing:

Don't ever pass references through a FOR loop by just wiring them in and back out again. In your case you will be wanting to open the file outside the loop, write to it several times inside the loop, and then close it when the loop terminates.

The problem is that (unlike a WHILE loop) a FOR loop can execute zero times. When that happens any datavalues coming from the loop are set to their default state--which in the case of a refnum is an invalid reference.

When passing a refnum through a loop like this always use a shift register. With a shift register, if the loop executes zero times the right terminal will default to the value of the left terminal--which is your valid refnum. (BTW: the same
thing goes for the error clusters on the file IO routines).

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 11 of 13
(898 Views)
Wow Mike! How did you know I would be that much of an idiot? That is EXACTLY what I had done. For some reason it did seem to work that way,(don't know why), but I will certainly take your advice from here on. Thanks again, you're a great asset to this forum.

Paul
0 Kudos
Message 12 of 13
(898 Views)
How? Simple:

Been there, done that, got a t-shirt...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 13 of 13
(899 Views)