Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
YAQ on dangling reference
Message
 
 
To
29/03/2012 13:29:40
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01539685
Message ID:
01539710
Views:
35
>>>>Hi,
>>>>
>>>>I am sorry for bringing up this topic again but I need to clarify something.
>>>>
>>>>Say a Form A calls a Form B and passes to the form B the value of itself (THISFORM). In the INIT method of Form B the value of the passed THISFORM (or Form A) is assigned to the form property FormB_ReferenceFormA. So now the Form B property FormB_ReferenceFormA hold the value referencing the form A.
>>>>
>>>>Then if somewhere in the form Form B the code sets the value of FormB_ReferenceFormA to NULL, does it actually release Form A? TIA.
>>>
>>>NO
>>
>>Thank you for confirming it.
>
>
>I have this ih the Unload() of my form class
>
>
>if( !isNull(m.this.CallingObject) )
>	this.CallingObject.DoFormReturnValue = this.ReturnValue
>	this.CallingObject = Null	&& or this form would not disappear
>endif
>
I understand. I have just the line
this.CallingObject = Null
The reason I asked the question is I ran into an issue. And I thought that the issue was caused by this line (above) releasing the calling object. It turned out to be completely unrelated. So I jumped the gun. Sorry.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform