clsocket icon indicating copy to clipboard operation
clsocket copied to clipboard

WSACleanup not called

Open BongoVR opened this issue 3 years ago • 0 comments

In CSimpleSocket::Initialize the m_hWSAData is initialised under Windows using WSAStartup. According to MSDN, each call to WSAStartup must have a matching call to WSACleanup. However, the entire library is lacking such a call: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-wsastartup

When frequently creating sockets, sending data, closing and destroying sockets, this might cause resource leaks.

Is this just an oversight? Best regards

BongoVR avatar Dec 15 '21 10:12 BongoVR