Hi Larry, Christian,
I don't think putting [code you need to run to release an object] in the Destroy will help. If it could destroy, it wouldn't hang.
In Debug mode, I would just Cancel, then Object.CloseApp(). If all objects have a Release, it makes it easier to remember the method to envoke. CloseApp is specific, but in an abstract sense, don't you just want the app to go away. What's the generic term for that? Release().
>>>I've experienced this problem when I have forgotten to clear object references. If you assign object references to a property of your application object and don't clear it by setting it to .NULL., VFP could hang trying to clear out the memory.
>>>
>>>Just a thought.
>>
>>This is the case with my registry class, it is assigned to a property of my application object, and now when I set it to NULL in the closeApp method it works fine.
>>But suppose you have a program error and you want to step out of the program without being able to trigger the CloseApp method where you set object references to Null?
>
>Add it to the Destroy event of your application object or call a custom method from the Destroy method. This way, even if you clear all, as soon as the application is released, it will set its property to .NULL. itself.
Charlie