[geos-devel] Unclear objects lifetime and ownership issues in Monotone Chain components

strk strk at keybit.net
Wed Sep 24 11:06:41 EDT 2008


On Wed, Sep 24, 2008 at 04:56:29PM +0200, Mateusz Loskot wrote:
> strk wrote:
> > Truth is (and you know): GEOS needs a GC !
> > Can't keep being considered 1:1 mapping with JTS if doesn't have one...
> 
> Any particular GC technique you have in mind?
> 
> IMHO, one of possible and clean solution for this kind of issues in GEOS
> is to apply GC in form of shared_ptr - smart pointer that controls
> lifetime of objects and frees developers from knowing *when* an object
> is/should be deallocated.

As long as you're sure no circular references exist, shared_ptr 
wuold be fine. But the point is if we GEOS needs to directly
map JTS algorithms, they are based on a conservativ
garbage collector.

GCJ uses the bohem one, and is very nice.
Ever tried to build JTS natively ?

--strk;


More information about the geos-devel mailing list