>ON SHUTDOWN CLEAR EVENTS
I see this too and don't agree with it, first the code in the ON SHUTDOWN does method that runs thourgh like this:
local llContinue
llContinue = .t.
for each loForm in _screen.forms
llContinue = llContinue and loForm.QueryUnload
endfor
Notice it doesn't close any forms, meaning, if one can't close, they all can't close. Then in the Destroy() of the Application object it actually closes them down. All objects and managers are closen exppliclty, not with a CLEAR ALL.
It takes into effect many things like Version(2) as well, but it verifies that we can close everything before it closes a thing and issuses the CLEAR EVENTS.
Also, your FOR EACH and a release in the middle may skip every other form, you may want to find a new method for this.