The header file says about VixDiskLib_Cleanup
* When using VixDiskLib_ConnectEx, some state might have not been cleaned
* up if the resulting connection was not shut down cleanly. Use
* VixDiskLib_Cleanup to remove this extra state.
It is not really clear when the function should be used.
What types of unclean situations does it clean up ?
I have a one-shot (Linux) app that grabs information from a disk and then exits. Would it be a good idea to always call the function before connecting ? Before exiting ?
VixDiskLib_Cleanup : Remove leftover transports.
If virtual machine state was not cleaned up correctly after connection shut down, VixDiskLib_Cleanup() removes extra state for each virtual machine. Its three parameters specify connection, and pass back the number of virtual machines cleaned up, and the number remaining to be cleaned up. int numCleanedUp, numRemaining; VixError vixError = VixDiskLib_Cleanup(&cnxParams,&numCleanedUp,
-> VixDiskLib_Disconnect() near the end of program, and for safety add a VixDiskLib_Cleanup() call immediately afterwards.