Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Object skips Thisform.Release()
Message
From
11/06/2003 20:47:07
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00798705
Message ID:
00799194
Views:
64
>>Why isn't the first example (used in ALL the _base.vcx classes) a deadly embrace also?
form.control.method()
  this.oHost = thisform
endproc
form.control.destroy()
  this.oHost = .null.
endproc
>
>This is a one directional link, the contained object is holding an object reference to it's form, it is cleaning up that reference during it's destroy. This is part of the garbage in the FFC IMHO. The control simply doesn't need oHost, it can much more easily just use thisform in any place it'd be using this.oHost.
>

Hi David,
I got confused about something again.

In the example above, oHost is being set to .null. in the Control.Destroy(), which implies that the Control is not being destroyed until AFTER the Destroy() method.

Why isn't the form refusing to be destroyed, since the control still has a reference to an object at that point? The form shouldn't be able to be destroyed until after the control has released oHost.
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform