[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] [PATCH] Fix possible memory leaks with debugging turned on.
On Mon, Aug 15, 2011 at 19:26, Nick Mathewson <nickm@xxxxxxxxxxxxx> wrote:
>> Also, feel free to include evdns-example.c as sample of proper evdns
>> cleanup if you find it useful. I think, that cleanup is not trivial.
>
> Hm. I'd like to have something about dns usage in the samples code,
> but this one really only covers the variants of cancelling requests or
> calling evdns_base_free(). ÂIt's important stuff, but it doesn't
> really qualify as a generalized "how do I use evdns" example, which is
> what I think most people would be looking for.
Yes, it's "how do I cancel requests in case of failure", general case
is already handled by dns-example.c
Maybe, my example should be rather replaced by better comment to
evdns_cancel_request and evdns_base_free, or another implementation of
these functions.
It's not obvious, that event loop should be started once again to
really free allocated data and it's important from my point of view.
Anyway, final decision is up to you, the information about this trick
already exists in ML archive and that's enough for me :)
> (as a sidenote, remember that in C, "void foo(void)" takes no
> arguments, "void foo()" takes an unspecified number of arguments.)
Thanks, I missed it.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.