Skip to content

WSACleanup not called #25

Description

@BongoVR

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions