cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory Consumption

From: Lars Nilsson <chamaeleon_at_gmail.com>
Date: Tue, 17 Jun 2008 21:06:06 -0400

On Tue, Jun 17, 2008 at 8:24 PM, Justin Thomas <justin_at_jdthomas.net> wrote:
> Without fail, my memory usage for this program increases by 12 - 16
> bytes on each iteration. If I comment out the "HttpConnection" and
> "delete connection" lines, things stabilize, so I'm confident the leak
> is in that code. I'm guessing that I'm just missing a "cleanup" call
> somewhere, but I've been searching and cannot figure out what it could
> be.
...
> FILE * nullFile = fopen("/dev/null", "w");

Perhaps you're missing fclose() after curl_easy_perform()?

Lars Nilsson
Received on 2008-06-18