On Tue, Dec 16, 2003 at 07:39:43PM +0100, SteveKing wrote:
> While trying to find out why there's a leaked file handle
> (see http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=52249
> for the complete thread about this.) and where it could be leaked I
> stumpled across some code parts which deserve some reviewing (I think).
>
[...]
>
> libsvn_subr/io.c
> static int test_tempdir(const char *temp_dir, apr_pool_t *p)
> {
[...]
> svn_error_t *
> svn_io_open_unique_file (apr_file_t **f,
> const char **unique_name_p,
> const char *path,
> const char *suffix,
> svn_boolean_t delete_on_close,
> apr_pool_t *pool)
These functions both create temporary files in a pool. This means
that when the pool is cleared, the handles are closed. So these
functions do not technically leak handles, in and of themselves.
However, it is possible that in some cases the pool lifetimes are
longer than they should be:
It looks like SVNStatus::GetStatus() and SVNStatus::GetFirstFileStatus()
do not immediately clear their pools, rather they use a pool with the
lifetime of the SVNStatus object (it is a member variable). Could
it be that the SVNStatus object is not getting deleted immediately?
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 16 21:35:54 2003