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
In
CSimpleSocket::Initializethem_hWSADatais initialised under Windows usingWSAStartup.According to MSDN, each call to
WSAStartupmust have a matching call toWSACleanup.However, the entire library is lacking such a call: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-wsastartupWhen frequently creating sockets, sending data, closing and destroying sockets, this might cause resource leaks.
Is this just an oversight?
Best regards