Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dangling object reference
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00199740
Message ID:
00199747
Views:
12
>In the init of a modal form, I am storing a reference to the callng form in ThisForm.oCallingForm. When I exit the modal form, I set the ThisFrom.uRetval and Hide the form. I am running into a situation where the datasession is not releasing and it seems ThisForm.oCallingForm is creating a dangling object reference.
>
>If in the Init of the modal form I create a PUBLIC variable called poCallingForm and store a reference to the calling form, I can RELEASE poCallingForm on exit of the modal form and everything works great.
>
>My question is, how do you RELEASE ThisForm.oCallingForm? I tried RELEASE ThisForm.oCallingForm, but VFP says it has to be a varaible or an array. Any help is apprecaited.
>
>Kind Regards,
>
>Mat

Mat, you cannot release the property.
You need to put .NULL. in it.
ThisForm.oCallingForm = .NULL.

Nick
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
Previous
Reply
Map
View

Click here to load this message in the networking platform