>>CLOSE ALL
>>QUIT
>
>Isn't QUIT supposed to close all anyway?
>
QUIT is supposed to be well-behaved, and I'd always assumed up until a few months back that it made the standard ExitProcess() call to sghit down, which should close the shared .DLLs context and decrement it's reference flag. I discovered that at times it didn't always clean up the way I'd expected, especially with API calls that allocated NetAPI buffers, where I didn't clean them up properly as described in the MSDN.
Explicitly closing VFP's files, releasing memory variables, and then calling ExitProcess() seems to shut things down more consistently for me. In addition, using ExitProcess() allows me to return a termination code other than 0 if I want/need to do so. As I pointed out, it was a SWAG, but one with at least a little empirical data that it might be a workaround.
CLOSE ALL shouldn't be necessary, but I've seen doing RELEASE ALL/CLOSE ALL get rid of some dangling object refs that resulted in "Cannot Exit From Visual FoxPro" errors.