stil / CurlThin

Lightweight cURL wrapper for C# with support for curl_multi polling interface through libuv
Other
68 stars 18 forks source link

Memory leak on easy and multi #15

Open ypsik opened 4 years ago

ypsik commented 4 years ago

Hello,

SafeEasyHandler is defined as private SafeEasyHandle() : base(IntPtr.Zero, false)

So handle isnt owed by SafeHandle and ReleaseHandle will be not called. Then CurlNative.Easy.Cleanup(handle); missed in all examples (for multi is the same ). Or just change to private SafeEasyHandle() : base(IntPtr.Zero, true)

Werner-Prbk commented 3 years ago

Is there any update on this? I can confirm that there is a memory leak and would also suggest to change the implementation to

private SafeEasyHandle() : base(IntPtr.Zero, true)