Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Object skips Thisform.Release()
Message
From
11/06/2003 18:17:54
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00798705
Message ID:
00799165
Views:
47
David,
one of us is not understanding the other.

No Control.Destroy() method is ever STARTED. The Form.Destroy() executes, releasing the variable it's linked to, but NO CONTROL Destroy() ever starts. There is code in EVERY Control.Destroy() method on the form, but none of them ever get started.



>Bill,
>
>The form (or more generically any container) can't finish destructing until all of it's contained objects destruct.
>
>An object can not finish destructing until there are no object references to the object.
>
>Your command button can't destruct because you've put it in a "deadly-embrace" situation with the hyperlink. They both have object references to each other so neither one can cleanly destruct unless you use the code I posted a couple of messages back in both the button and the hyperlink.
>
>>I believe I understand the concept of an orphaned or dangling object. But this seems to be different.
>>
>>I do something like this:
>>
>>button.method()
>>  lo = createobject(HyperLink)
>>  this.oHyperLink = lo
>>  lo.addproperty('oCreator',this)
>>endproc
>>
>>When my code reaches the line "THISFORM.Release()" it just skips over the line. The Form.Release() method is never executed, but the variable that the form is linked to becomes .null.
>>Normally when I'm leaving a reference to an object, at least the Form.Release() is executed, it's just that the form doesn't leave the screen.
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform