NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i release a Sequence file i opened with the Engine.OpenSequenceFile method?

I opened the Sequence file and used PropertyObject to pass parameters to it...
It is successfully runnung. but once i exit, I am getting a message that File ws not released.
I added the following code in the finally block

finally

{

mEngine.ReleaseSequenceFile(CurrentSequenceFile);

axApplicationMgr1.CloseSequenceFile(CurrentSequenceFile);

mEngine.ShutDown(

true);

axApplicationMgr1.Shutdown();

}

still the problem persists.

0 Kudos
Message 1 of 3
(2,931 Views)
Hi,
 
From your code, it appears that you are doing everything correctly. In fact, I'm not sure that you even need to call mEngine.ReleaseSequenceFile.
 
Because you are creating a .NET object, you will need to do some garbage collection on those objects when you're done using them.
 
If you look at the TestStand OI, you'll see that a GC.Collect() method is called. This call forces .NET garbage collection. This should help you release your object.
 
Regards,
 
Matt M.
NI
0 Kudos
Message 2 of 3
(2,920 Views)

Thanks Matt !!!!

I'll certainly try that if the problem persists!!!

0 Kudos
Message 3 of 3
(2,912 Views)