PRB: Object that Received the Destroy Not ReleasedLast reviewed: April 30, 1996Article ID: Q127844 |
The information in this article applies to:
SYMPTOMSCalling the Destroy() function under program control to release an object does not work. The object is still there and its methods can perform tasks. This behavior is particularly visible with a form that receives the Destroy() because the form window is not deactivated.
CAUSEWhen Destroy() is explicitly called under program control, the method associated with the event is executed. However, calling the method does not trigger the event. To release a form, you must release the instance variable referencing the form object. The variable is released when it goes out of scope or when the RELEASE command is issued.
STATUSThis behavior is by design.
MORE INFORMATIONIn the Visual FoxPro event model, calling a method associated with an event will not trigger the event. The method can be executed as a response to an event or as a response to an explicit call (such as Thisform.Click()). To trigger the CLICK, DBLCLICK, MOUSEDOWN, MOUSEMOVE, or MOUSEUP events, use the MOUSE command. The ERROR event can be triggered by the ERROR command. For a list of events that Microsoft Visual FoxPro objects respond to, search for Events under the Language Reference topic in Visual FoxPro Help.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |