NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Object Reference passed by value or by reference

Is there a difference when passing object reference parameter by reference or by value? It seems to me that the behavior is the same.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 1 of 4
(422 Views)

Since you are not changing the reference itself, there is no difference IMHO

0 Kudos
Message 2 of 4
(386 Views)

But what if it is a connection refnum and I do the reconnection with a new refnum in place?

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 3 of 4
(382 Views)

@bienieck wrote:

But what if it is a connection refnum and I do the reconnection with a new refnum in place?


This should make the old ref invalid thus ByRef would be required IMHO. Yet.... If I understand you correctly, it didn't matter in your case, right?

Maybe your reconnect reuses the refnum?

 

Yet this is highly speculative from my side

 

 

0 Kudos
Message 4 of 4
(348 Views)