[geos-devel] Finding the Leak

Paul Ramsey pramsey at cleverelephant.ca
Tue Aug 19 12:01:14 EDT 2008


This is where I was headed this morning until I had two children
dropped on me. There needs to be an accessor for baseGeom in the capi
so that PostGIS can actually manage the destruction of the Geometry.
BTW have a look at the _destroy functions in capi and tell me if it
would be better to run the factory destruction than what is there now
(simple delete).

P.

On Tue, Aug 19, 2008 at 8:53 AM, Mateusz Loskot <mateusz at loskot.net> wrote:
> Martin Davis wrote:
>>
>> I don't really feel competent to comment on Mateusz' suggestion of smart
>> pointers.  But in the near term, isn't the simplest solution just to declare
>> that managing the Geometry associated with the PreparedGeometry is the
>> responsibility of the client?  In this case the client is PostGIS, and I
>> think I'm right in saying that there is an obvious, correct place to delete
>> the created geometry - i.e. immediately after the PrepGeom is deleted.
>>
>> This avoids copying, and doesn't require any fancy pointer stuff.
>>
>> Or am I missing something?
>
> Martin,
>
> I support this idea and AFAIU the problem it should work well.
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> Charter Member of OSGeo, http://osgeo.org
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>


More information about the geos-devel mailing list