Neil Mitchell
Neil Mitchell

Reputation: 9250

Is it necessary to call WSACleanup before program exit

I have a Windows socket program (XP and above) that calls WSAStartup. Is it necessary to call WSACleanup before the program exits? If I don't, will there be any negative consequences? In particular is:

WSACleanup();
exit(0);

different from merely exit(0). I realise that on Win16 omitting the WSACleanup would leak system resources, is that still the case.

Upvotes: 6

Views: 1243

Answers (0)

Related Questions