winsock getaddrinfo

Hello. Hope everything is alright!

I have a question about winsock getaddrinfo(domain_addr, "43", &hints, &result);

After a call to that function, the last parameter points to a list of addrinfo structs. So this means that getaddrinfo has created something with the "new" operator.

Now my program makes a lot of calls to this function so I wonder when and how the values are deleted.
https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo

I am not a windows guy, but there is a section "Freeing Address Information from Dynamic Allocation" in the above document :+)
thanks man! freeaddrinfo() <---
Topic archived. No new replies allowed.