>>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