[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Free buffer of a http request



Hi Nick,

Thanks for the response. Here is a follow up.

The evhttp_make_request procedure is used several times on the same connection (http persistance). In this case, is the request structure freed when I make a new request using the same connection? I do not own the request. After several requests, I call evhttp_connection_free procedure once. Is this memory leaking?

Thanks,
Bruno

On Thu, Sep 6, 2012 at 3:23 PM, Nick Mathewson <nickm@xxxxxxxxxxxxx> wrote:
On Thu, Sep 6, 2012 at 1:13 PM, Bruno Avila <brunotavila@xxxxxxxxx> wrote:
> Hi,
>
> Once I make an evhttp request (e.g. GET) and read the content from the
> evbuffer, which buffers of struct evhttp_request should I free? Or is done
> transparently by libevent?

When the request is freed, its buffers should get freed too.

evhttp_request is not supposed to be a structure whose internals you
need to look at.

--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.