[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r1553822 - in /subversion/trunk/subversion/bindings/swig: include/svn_types.swg perl/libsvn_swig_perl/swigutil_pl.c perl/libsvn_swig_perl/swigutil_pl.h

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sat, 28 Dec 2013 16:35:14 +0100

> -----Original Message-----
> From: rschupp_at_apache.org [mailto:rschupp_at_apache.org]
> Sent: zaterdag 28 december 2013 14:07
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1553822 - in
> /subversion/trunk/subversion/bindings/swig: include/svn_types.swg
> perl/libsvn_swig_perl/swigutil_pl.c perl/libsvn_swig_perl/swigutil_pl.h
>
> Author: rschupp
> Date: Sat Dec 28 13:06:50 2013
> New Revision: 1553822
>
> URL: http://svn.apache.org/r1553822
> Log:
> Make bindings helper svn_swig_pl_set_revision() use _global_pool (where
> available).

While I assume this fixes a real problem... using the *global pool* is actually introducing a memory leak.
Passing this as a pool (or even worse as a scratch_pool) will just make the C code allocate memory that is never freed.

Personally I would say that the bindings should abstract away all the pool magic for the api users, but I think this would be very hard (if need impossible) to implement on the automatically generated swig bindings. But perhaps it can be done in a higher layer abstraction.

It would be very nice if somebody invested some time to take a look at this someday...

        Bert
Received on 2013-12-28 16:43:07 CET

This is an archived mail posted to the Subversion Dev mailing list.