LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Stamp incorrectly displayed in XLS file when Milliseconds is used


@Mitch_Peplow wrote:

Hi all,

 

Right I pinged an SR to NI ding the correct procedure to closing off references and this is their reply:

 

"Typically you would close the references in the reverse order you created them but I believe you are right in saying that destroying a reference does not destroy the actual object it is referencing and hence you should be able to use methods that were invoked from that object. I have had a discussion with several CLA's in the office and can confirm that for most functions you will be able to access the sub methods even if the parent class has had its reference destroyed"


That's true as long as the underlaying server component does correct ActiveX object refcounting, which is a pretty complicated matter to do absolutely correct, and sadly enough even many seasoned programmers tend to get that wrong sometimes. So while in theory the answer is right, in practice it could bite you in your a**, if the ActiveX component developer got the refcounting of the subobject wrong.

 

Therefore I do recommend to follow the rule of destrying the objects in reverse order of aquiring them, even if it SHOULD also work in any order!

Rolf Kalbermatter
My Blog
0 Kudos
Message 31 of 32
(724 Views)

@Mitch_Peplow wrote:

Hi all,

 

Right I pinged an SR to NI ding the correct procedure to closing off references and this is their reply:

 

"Typically you would close the references in the reverse order you created them but I believe you are right in saying that destroying a reference does not destroy the actual object it is referencing and hence you should be able to use methods that were invoked from that object. I have had a discussion with several CLA's in the office and can confirm that for most functions you will be able to access the sub methods even if the parent class has had its reference destroyed"

 

Hope this helps

 

Cheers

 

Mitch

 

 


That's true as long as the underlaying server component does correct ActiveX object refcounting, which is a pretty complicated matter to do absolutely correct, and sadly enough even many seasoned programmers tend to get wrong sometimes. So while in theory the answer is right, in practice it could bite you in your a**, if the ActiveX component developer got the refcounting of the subobject wrong.

 

Therefore I do recommend to follow the rule of destrying the objects in reverse order of aquiring them, even if it SHOULD also work in any order!

Rolf Kalbermatter
My Blog
0 Kudos
Message 32 of 32
(721 Views)