Craig,
There's a bug in earlier releases of VFP where calling PEMSTATUS() more than once inside a single VFP command could increase the internal object reference counts and cause the objects to not release. ObjRef can not find these kinds of problems. The workaround is to split the calls:
ll1 = pemstatus()
ll2 = pemstatus()
if ( ll1 and ll2 )
...
instead of
if ( pemstatus() and pemstatus() )
...
>David, the OBJREF() utility was the first thing I tried!
>
>Yes, I am using a PEMSTATUS command in the form, is there a bug with this?
>
>I have found the problem, it is somehow related to the grid object on the form, that was being removed and added again. I have modified it and now leave the grid object and add/remove the columns only and presto the problem is fixed.
>
>not sure exactly what component of the grid was still referencing the form though...