[geos-devel] GEOS cross-heap problems

Mateusz Loskot mateusz at loskot.net
Wed May 13 12:47:23 EDT 2009


Frank Warmerdam wrote:
> Sean Gillies wrote:
>>
>> On May 13, 2009, at 7:42 AM, Mateusz Loskot wrote:
>>
>>> Frank Warmerdam wrote:
>>>> strk wrote:
>>>>> On Wed, May 13, 2009 at 12:19:23AM -0400, Frank Warmerdam wrote:
>>>>> Only, it'll have to stay (I've read Mateusz suggesting using
>>>>> type-specific destroyers).
>>>> I cannot imagine why a type specific destroyer would be needed
>>>> for simple malloc()/free() buffer allocations.
>>>
>>> Frank,
>>>
>>> But GEOS user does not know what allocator is hidden behind 
>>> GEOSGeomToWKT function and he does *not* need or want to know.
>>>
>>> GEOSFree exposes all the meat that is supposed be encapsulated
>>> and it makes GEOS C API not symmetric so confusing.
>>
>> Aren't we supposed to be using the reader/writer API now? Add 
>> GEOSWK*Writer_Free functions (if we must) to those interfaces and 
>> GEOSFree to address the problem with deprecated GeomToWKT?
> 
> Sean / Mateusz,
> 
> It is my personal opinion that since these buffers are just allocated
> from the heap with malloc(), exposing a GEOS specific free - and making
> it clear when it is suitable to use is a more than adequate solution.
> 
> If you guys feel strongly enough about type specific, or reader/writer
> interface specific deallocators for these buffers then I'd suggest you
> bring it to a motion to replace/override my implementation and I'll
> then adapt GDAL appropriately.

I have no idea of GEOS C API design in terms of consistency vs entropy.

> I'm in a bad mood, and less receptive than normal to esoteric conceptual
> correctness wanking.

I'm not responsible for GEOS development, so please forget
about the mess I've caused here and there.

As usually, I probably shouldn't take the floor :-)

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the geos-devel mailing list