On Tue, 2 Dec 2008, Brad House wrote:
> I'd prefer not to have ares_save_options() deprecated. I'm actually using
> it to cache the config outside of any connection context as I can't
> guarantee there is a connection context available at that point. I guess I
> could keep a connection context around that will _never_ be used, but that
> seems a little more wasteful.
Only a tad bit more memory will be used for that, and it does IMHO have the
added benefit that we won't have to introduce another new opaque
handler/object type since the ares_config struct isn't enough anymore to keep
a copy of the config.
Since ares_save_options() isn't gonna give you a full copy of the options, I
think the penalty of keeping an extra handle around to be able to clone
options from is fairly small and a better API than adding another
ares_save_options() version with a corresponding new ares_init_options()
version.
-- / daniel.haxx.seReceived on 2008-12-02