[getdns-api] Memory - user should destroy response
Willem Toorop
willem at nlnetlabs.nl
Mon Jan 20 16:52:53 CET 2014
Based on our current implementation we have some practical suggestion on
where responsibility of memory should lay.
First of al we feel that response objects are in the users jurisdiction.
They should be able to pass it around in their application and destroy
it when fit. Therefore we would like to alter the description text for
the callbacks response parameter in section 1.5 from
A response object with the response data. This is described
below. The response object is part of the API's memory space,
and will be freed by the API with the callback returns.
into:
A response object with the response data. This is described
below. The application is responsible for cleaning up the
response object with getdns_dict_destroy.
Note that this behaviour is already documented in 1.9 (last line):
When you are done with the data in the response, use the
following function so that the API can free the memory from its
internal pool.
void getdns_dict_destroy(struct getdns_dict *response);
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org
More information about the spec
mailing list