[geos-devel] An Immodest Proposal
Paul Ramsey
pramsey at cleverelephant.ca
Wed Oct 1 18:58:38 EDT 2008
OK, I understand this diabolical scheme.
Now we just need GEOS to not leak.
Easy peasy :/
P.
On Wed, Oct 1, 2008 at 3:12 PM, Mark Cave-Ayland
<mark.cave-ayland at ilande.co.uk> wrote:
> Ah but we do this in PostGIS already - this is exactly how I implemented
> caching for PROJ.4 objects :)
>
> The way it works is to attach our own set of methods to a new child
> memory context of the function context. Then when this is context is
> destroyed at the end of the query/abort, we can go through the list and
> free everything as required.
>
> Now the trick would be to do this hierarchically: say for example you
> have something like this in GEOS:
>
> Geometry
> |
> CoordinateSequence
> |
> Coordinate
>
> Thus each layer would store the list of malloc()d pointers for
> everything in the immediate layer below it. This would then mean that we
> would only need to track the topmost pointer within PostGIS since
> deletion of this object would automatically cause a cascade deletion of
> everything else.
>
>
> ATB,
>
> Mark.
>
>
> _______________________________________________
> 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