Example in Rust: https://gist.github.com/telcy/b1c3a444def65dd0f1d109b6a98db0f1
Usually I try to find the issue at my end, but this seems to be out of my control. It is a bit mind boggling for me how a crucial part of an operating system leaks memory without anyone noticing.
I hope this gets some attention (and discussion) as this would mean most applications on macOS with network requests do leak memory to some extent.