I have a container control that has in it's Destroy method a call to an object that has a reference to it. When the Form is closed I thought the Destroy method of the container would fire before the form's Destroy. The container object has the following in the Destroy.
oObject.Detach(nUniqueID)
DODEFAULT()
The Detach method of the oObject then looks up the objects reference using the nUniqueID and then sets it's Object reference to NULL. However, the Destroy code never fires. I even put a WAIT WIND in to see if it fired and it didn't. In the Form's Destroy I can put in the code of THISFORM.oContainer.Detach(nUniqueID) and all works fine. I am trying to write this container control to be able to be dropped onto the form and manage itself.
I wonder if I could instantiate a Timer to release the object?
Any ideas?