>>Everyone,
>>
>>I'm having a problem where by when my form closes the DataSession doesn't close properly and "Unknown(< ? >)" is left, these can build up and I'm assuming use resources.
>>
>>I've searched the Posts and found some that suggested lingering object references were to blame, yet I've taken every precaution to ensure this is not the case, yet, I can narrow the cause down to 1 method of an Object that I call.
>>
>>The Method Manipulates several objects, (creating and destroying others).
>>
>>I'm assuming that when I declare a variable using "LOCAL" and assign that variable an Object Reference or use it in a "FOR EACH" Collection itteration that when the Method ends that Reference (LOCAL) is destroyed.
>>
>>Is there some additional clean up I should be performing or have I made some invalid assumptions?
>>
>>Any helpful advice would be appreciated.
>>
>>Thanks,
>>
>>- Aaron.
>
>A few other things to look for..
>
>* any buffered data that may have been changed but not committed
>* any double used of PEMSTATUS() - using this more than once in one command line can leave an outstanding object reference
>* any object references that themselves have object references, especially if the object reference is in a property. for properties, set property=.NULL. to clear it out.
Trey,
Thanks for the tips, but I think I found what's causing the problem, and it does indeed seem to be a lingering object reference.
I use several "FOR EACH oSubObj IN oObjRef" Loops and these seem to be the cause, because if I replace them with something like:
FOR m.nIndex = 0 TO m.oObjRef.Length - 1
...
ENDFOR
I don't get the problem, reasons anyone?
- Aaron.
Aaron Young
Red Wing Software, Inc.