I'm not sure what this is: form1RefCount. Is this a system variable? How can I test for this. I'm think I'm missing something very simple here.
>Hi Ramil,
>
>loForm1 = CREATEOBJECT("form") && form1RefCount =1
>loCol = CREATEOBJECT("collection")
>loCol.Add(CREATEOBJECT("form"),'1') && form2RefCount =1
>
>loCol.Add(loForm1,'2')&& form1RefCount =2
>
>* path1
>? loCol.Remove('2') && form1RefCount = 1
>
>* path2
>loForm1 = NULL && form1RefCount = 1
>? loCol.Remove('2') && form1RefCount = 0 then VFP release object
>
>Fabio
ramil
~~ learning to stand still