clsocket
clsocket copied to clipboard
WSACleanup not called
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