Michael Clark wrote:
Lucian Adrian Grijincu wrote:
I don't know if dir_cleanup should be registered to handle the cleanup of
this apr_dir_t (I'm against it). I got the apr_os_dir_t from some place
else, I should manage it's death manually.
If I want to let APR call closedir() on this object I can register a
cleanup function for it on the same pool, manually.

If there was a newer interface added, it might be nice to have an 'owner' argument in addition to dirname and let it register the cleanup if it is owner.

Otherwise it is not possible to get apr_dir_close to work on one of these dirs as dir_cleanup is static and can't be registered manually from outside or apr - so you a forced to get lazy cleanup only.


Reply via email to