>Hi, > >I have a commandbutton with this code in its Click Method > >Do with Thisform > > >And in 's Init >Lpara toForm >Thisform.oCallingform=toForm > >In its Close Commandbutton >If VarType(Thisform.oCallingForm)="O" Or !Isnull(Thisform.oCallingForm) > Thisform.oCallingForm=.NULL. >Endif >Thisform.Release > >Does this clear the Reference? Some Systems freeze after a number of calls from the main form. > >Anyone has a clue? > > >TIA
That should clear the reference, but I think you can simplify your code by using just
Thisform.oCallingForm=.NULL. Thisform.Release
unconditionally, because you have to reset oCallingForm property to NULL anyway before closing the form.
Nick Neklioudov Universal Thread Consultant 3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison