Added evhttp request on free callback
This adds a callback from evhttp_request_free() that guarantees resources associated with an evhttp_request can be deallocated. I found this necessary because the on complete and on error callbacks are not always called which can lead to memory leaks. This callback makes the resource deallocation explicit.
Coverage decreased (-0.008%) to 80.539% when pulling 63a61932f5906929fc83370725c83f4ea4c6e7e4 on CauldronDevelopmentLLC:evhttp_request_on_free_cb into f24b28e4aff1dbc3440e283f70ac15aa7cebcc8d on libevent:master.
This patch is what I want
@azat
Plus this change will need a unit test.
I'm confused as to how to create a unit test in this code base.
Also would you mind to change the documentation to address issues that you found in #589?
Not sure what you mean here.
I'm confused as to how to create a unit test in this code base.
regress_http.c
Not sure what you mean here.
I meant that we need to document order/cases in which callbacks will be called, so that it will be possible to figure this out without looking into sources, and since you adding yet another callback (and I assume that already look into all available callbacks in http and your knowledge was fresh, egh was cause it passed almost year since this pull request had been submitted) I would love to see separate patch that documents this.