12-09-2011 10:45 AM
I am calling DisplayNewUserDialog from a VI, adding the returned userObject to the UsersFile, and closing all references. When I exit the program directly after doing this, I consistently get warnings like described below. I can't find any more references to close!
References to PropertyObjects were not released properly.
Total number of objects: 84
Number of top-level objects: 3
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:
Type Definitions [2 object(s) not released]
Type Definition #1:
Name: User
Type Definition #2:
Name: NI_UserCustomPrivileges
And the following uncategoried objects:
User
Name: generic.user
Solved! Go to Solution.
12-09-2011 10:56 AM
Here is the code using the returned userObject. (The reference gets closed by the caller).
12-09-2011 02:30 PM
Here is a guess...
Try closing the reference from your 'AsPropertyObject' from the 'user' property node. This is the reference you are adding to the SetPropertyObjectbyOffset.
Otherwise, I find it odd you have closed the 'UsersFile' before closing the 'UserList' refnum, but maybe that doesn't make a difference.
Good luck,
PH
12-09-2011 03:11 PM
@Teds wrote:
Here is a guess...
Try closing the reference from your 'AsPropertyObject' from the 'user' property node. This is the reference you are adding to the SetPropertyObjectbyOffset.
Otherwise, I find it odd you have closed the 'UsersFile' before closing the 'UserList' refnum, but maybe that doesn't make a difference.
Good luck,
PH
Hi PH,
Thanks! That actually worked! You're right that it looks like I'm closing my references out of order, but it seems to me that the order doesn't matter since I'm done with them all by the time all the error wires get connected to the close VI's. But in the interest of clarity I will rearrange so the closures are in reverse order of use.
Thanks for the help. I can check my code in and have a nice weekend now.
Gizmogal