Hi everyone,

I'm still learning, but I'm hoping you can help.

I have libcurl up and running and love it.  But, I'm seeing memory leaks
and not sure if it's me or something else.

Stats:
-  Windows platform x64, with Visual Studio 2022.
-  Downloaded source code from curl website as a .gz file.
-  Building according to win instructions using Native Tools:

   1. *nmake /f Makefile.vc mode=dll MACHINE=x64 WITH_SSL=no DEBUG=no*


I have a very simple program that sends data to Mockbin.  It responds with
the payload I sent plus a whole lot more.

When my program is done though, VS2022 CRT debug tools claim that there is
a memory leak.  Looking at the debug output, it's coming from the response
that I'm getting from Mockbin.

'curlmemleakexample.exe' (Win32): Unloaded
'C:\Windows\System32\FWPUCLNT.DLL'
Detected memory leaks!
Dumping objects ->
{160} normal block at 0x000002181100D260, 2496 bytes long.
 Data: <         {      > 00 20 20 20 20 20 20 20 20 7B 0A 20 20 20 20 20
{159} normal block at 0x00000218110062C0, 16 bytes long.
 Data: <@d              > 40 64 80 A5 F6 7F 00 00 00 00 00 00 00 00 00 00
Object dump complete.

The data above is the response from Mockbin based on the length of the
bytes and what I saw come back from Wireshark over HTTP.  I am calling
global_init before my program starts, and calling global_free when I'm
done.   I have pasted my sample of code at the following link:

https://www.codebin.cc/code/304ead33e4dd78b7bb1eeb36460eed6a9a4fe85506b6f4185329a6e861e00f6e

Why would I still be getting reported memory leaks on the information from
the callback?  Is it because my callback is a global function?  Am I maybe
not understanding something about the API and maybe it requires the
function to do something different?

Many thanks in advance for your help and assistance.  I hope I was able to
give you enough details.

Thanks....Tyler!
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to