[postgis-devel] memory management questions #1
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Tue Oct 26 02:08:49 PDT 2010
Paul Ramsey wrote:
> It doesn't even look like we use PG_FREE_IF_COPY right:
>
> http://doxygen.postgresql.org/fmgr_8h-source.html
>
> From my reading the correct usage would be:
>
> PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
> PG_FREE_IF_COPY(geom, PG_GETARG_DATUM(0));
No, that doesn't look right at all based upon the definition of
PG_FREE_IF_COPY. n is definitely just a parameter offset into the fcinfo
structure.
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the postgis-devel
mailing list