05-20-2011 09:53 AM
I'm trying to use the TestStand API in LabVIEW to return some properties of a sequence file, and keep getting a warning "The following top-level objects were not released" after my code finishes running. Below is an example snippet, and the resulting error text. I thought I was correctly releasing the sequence file by calling ReleaseSequenceFileEx, but there seems to still be a problem. Anyone know what I'm doing wrong?
Thanks,
-Joe
References to PropertyObjects were not released properly. Total number of objects: 1269 Number of top-level objects: 24
Note: Some top-level objects may be included if they are referenced by an incorrectly released top-level object. For example, an unreleased SequenceContext object references a SequenceFile object.
The following top-level objects were not released:
Files [1 object(s) not released] SequenceFile #1: Path: C:\Sequence File 1.seq
Type Definitions [20 object(s) not released] Type Definition #1: Name: PassFailTest
Type Definition #2: Name: FlexCStepAdditions
Type Definition #3: Name: FCParameter
Type Definition #4: Name: FlexGStepAdditions
Type Definition #5: Name: VIParameter
Type Definition #6: Name: VIParameterElement
Type Definition #7: Name: EditSubstep
Type Definition #8: Name: CommonResults
Type Definition #9: Name: Error
Type Definition #10: Name: TEInf
Type Definition #11: Name: NI_CommonCParameterResult
Type Definition #12: Name: NI_LabVIEWParameterResult
Type Definition #13: Name: NI_CustomResult
Type Definition #14: Name: NI_PropertyObjectType
Type Definition #15: Name: NI_ArrayDimensions
Type Definition #16: Name: StepTypeSubstepsArray
Type Definition #17: Name: StepTypeNIData
Type Definition #18: Name: StepTypeMenu
Type Definition #19: Name: Expression
Type Definition #20: Name: Path
PropertyObjects [2 object(s) not released] PropertyObject #1: Type: Number Value: 0
PropertyObject #2: Type: Number Value: 0
And the following uncategoried objects: TypeUsageList (Obj)
Solved! Go to Solution.
05-20-2011 10:05 AM
A couple of things
1) You are not closing the sequence file reference.
2) Since the application manager is being passed in I don't think you are supposed to close that reference. I'm not a labview expert though so I might be wrong, in C/C++ it would work this way though (a reference passed in as a parameter would not be one you are expected to release).
Hope this helps,
-Doug
05-20-2011 10:45 AM
Thanks, Doug. Your suggestions worked. I thought the ReleaseSequenceFileEx call was taking care of the sequence file ref, but I guess not. That's what I get for trying to code with this API without understanding it very well. 🙂
Here's the working code: