void __cdecl FlowSshC_Shutdown();
[Initializer] void Shutdown();
[SshNet] public static void Shutdown();
Methods and Parameters
Shutdown should be called before exiting the process, for instance, right before returning from the main function ([C] or before calling FreeLibrary if FlowSshC.dll is loaded dynamically). Handlers may be called during shutdown, however, no handler can be called once shutdown is complete. Shutdown will never raise FlowSshC/Cpp/Net errors.
What shutdown does is disconnect/abort any connected/connecting client and closes all opened/opening channels. It then waits for all FlowSshC threads to finish gracefully.* Furthermore, it frees resources acquired during the initialization and releases all the library internal references to client, channel, and handler objects. What shutdown does NOT do is destroy objects that haven't yet been disposed. Example: If your code holds a reference to a client object, this object won't be deleted from memory by the Shutdown call. The object will be deleted later, as soon as you code releases it.
* The following functions create a new FlowSshC thread:
[C] After shutdown finishes, FlowSshC may be used normally if initialized again with FlowSshC_Initialize. In [Cpp/Net] this is not supported.