Mladen Turk
Wed, 23 Jul 2008 01:08:28 -0700
Bojan Smojver wrote:
destructor(res) { socket_shutdown(res->sock); socket_close(res->sock); }If we follow the design pattern Joe explained, we should not do the above. Most definitely will segfault.
That's my point. The API is very unclear in that case and you *must* follow certain rules. Again you cannot call pool_create in constructor and then pool_destroy in destructor without segfaulting, and that bring us to the original problem. Also additional pool is always created for each resource which might not be what user needs (not to mention the API change in that case, since original says that constructor is provided with the pool used for apr_reslist). Regards -- ^(TM)