It sounds like it might be the actual library when it comes to cleaning up after itself. The other thing you might try is the WINAPI to free the DLL. Whether VFP would have a problem with that, I don't know ...
DECLARE INTEGER GetModuleHandle IN KERNEL32.DLL ;
STRING @ lpModuleName
DECLARE INTEGER FreeLibrary IN KERNEL32.DLL ;
INTEGER hModule
LOCAL hModule
LOCAL nRet
hModule = GetModuleHandle( "WinINet.DLL" )
nRet = FreeLibrary( hModule )
? IIF( nRet <> 0, "Library released", "Release failed" )
>>Try clearing each DLL with a separate statement vs one statement.
>>
>>If that doesn't help, display the elapsed time after each CLEAR statement and see if the system is hanging on one CLEAR in particular.
>>
>>That might at least narrow the problem down.
>>
>
>Hi!
>
>I had already tried that with no luck I even changed the order of the dlls being cleared still no luck (with a seperate statement for each one)
>
>It seems that no matter which order I clear them they all clear very quickly (when using a seperate statement for each one) except for the last one, that's where it takes time. The last one could be any one from the list of dlls.
>
>
>Sarosh