不會自動釋放的。
需要WSACleanup來對應WSAStartup,請看MSDN中這段說明:
An application must call one WSACleanup call for every successful
WSAStartup call to allow third-party DLLs to make use of a Ws2_32.dll on
behalf of an application. This means, for example, that if an application calls
WSAStartup three times, it must call WSACleanup three times. The
first two calls to WSACleanup do nothing except decrement an internal
counter; the final WSACleanup call for the task does all necessary
resource deallocation for the task.
不會自動釋放的。
需要WSACleanup來對應WSAStartup,請看MSDN中這段說明:
An application must call one WSACleanup call for every successful
WSAStartup call to allow third-party DLLs to make use of a Ws2_32.dll on
behalf of an application. This means, for example, that if an application calls
WSAStartup three times, it must call WSACleanup three times. The
first two calls to WSACleanup do nothing except decrement an internal
counter; the final WSACleanup call for the task does all necessary
resource deallocation for the task.