[postgis-devel] Memory in the Meantime

Paul Ramsey pramsey at cleverelephant.ca
Wed Jan 7 15:25:55 PST 2009


On Wed, Jan 7, 2009 at 2:54 PM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
>> liblwgeom, which seems to somewhat get there. I would propose that our
>> "in the meantime" strategy for this is:
>>
>> lwfree_* is a deep free.
>> lwrelease_* will free everything down to just above the serialized piece

> My first thought was that it's a lot of work to go through the code and
> locate all the correct places, but then I realised that you only need to
> look at the code in lwgeom/ which reduces the work by quite a lot.

I've looked, it's really not a big deal, I'm happy to do it, and I
want to, since the memory implications for the loader are *massive*
(fixing the loader requires more than just adding one line, it
requires a replacement for lwfree_poly which actually does the deep
free... so, 8 lines :) But still feels wrong to be building what
should be library infrastructure into the loader.

I'm going ahead with it, it will allow me to finish up the GUI. Which,
BTW, feels like a step backwards in code attractiveness, since I
didn't re-write the core code in the end, just retrofitted the output
handling.

P.



More information about the postgis-devel mailing list