[postgis-devel] memory management questions #1
Paul Ramsey
pramsey at opengeo.org
Tue Oct 26 07:20:35 PDT 2010
Right you are, I misread PG_GETARG_POINTER(n) as DATUM_AS_POINTER.
P
On Tue, Oct 26, 2010 at 2:08 AM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> 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
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
More information about the postgis-devel
mailing list