[getdns-api] PHP Language Bindings and Async Event Management

Goyal, Neel ngoyal at verisign.com
Mon Apr 20 19:57:44 CEST 2015


Freeing the context should not clean up the event base.  If the event base
is shared between other async libs and they are adding to that event base,
a context destroy should not prevent those libs from still functioning.
The context_destroy makes sure the context is detached from the
event_base, but any structures specific to libevent are not cleaned up.
Much like the user has to create the lib event base explicitly and then
attach it to getdns, the user has to free it.

On 4/20/15, 12:51 PM, "Melinda Shore" <melinda.shore at nomountain.net> wrote:

>On 4/20/15 4:38 AM, Hollenbeck, Scott wrote:
>> So I did a little more reading of the getdns source code and I think
>> I answered the question I sent a few minutes ago. It looks like
>> getdns_context_destroy() will free any existing event base.
>
>Well, it depends.  I'm using my own context data structure to cache
>attribute values, etc., and that includes the event_base.  So, when
>the Python interpreter removes an instance of a Context object I
>release those, myself.  It's been over a year since I looked closely
>at that code and think I can get rid of a lot of those, but that's
>a different matter.  But yes, if you're using
>getdns_extension_set_event_base()
>context_destroy() will free the event_base, too.
>
>Melinda
>
>
>
>-- 
>Melinda Shore
>No Mountain Software
>melinda.shore at nomountain.net
>
>"Software longa, hardware brevis."
>_______________________________________________
>getdns-api mailing list
>getdns-api at vpnc.org


_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org



More information about the spec mailing list