Unloads the .NET AppDomain and any loaded assemblies within it.

Make sure there are no outstanding References

You should ensure that before releasing the runtime there are no outstanding .NET references active or VFP will potentially crash when any references are accessed!

In general we don't recommend you call this method, but it can be useful to unload all .NET classes that were loaded and in fact release most of the active working memory of the .NET runtime. It's also useful in that it will release the lock on any loaded assemblies so if you're working on both .NET and FoxPro code at the same time you won't have to shut down VFP, but you can unload the runtime with this method.

Note that although this code theorhetically unloads the .NET runtime it doesn't completely remove it - the DefaultAppDomain continues to stay loaded and the base libraries (mscorlib, mscorree) continue to stay loaded inside of Visual FoxPro and can never be