[geos-devel] CGAlgoritms singleton

strk at refractions.net strk at refractions.net
Thu May 19 03:41:59 EDT 2005


Actually, if there's no state, why not using a namespace instead ?

--strk;

On Thu, May 19, 2005 at 09:39:05AM +0200, strk at refractions.net wrote:
> Hunting for the multipolygon buffer bug I've seen one of
> multiple places where CGAlgoritms class is instanciated.
> Apart from high paranoia due to Robust/NonRobust implementation
> (actually marked as obsoleted in GEOS) I don't really 
> understand if we really have a need to instantiate that
> class multiple time.
> 
> Wouldn't it be smarter to make it a Singleton and
> store reference to it in the different classes ?
> 
> (the instance I'm talking about is in OffsetCurveSetBuilder.cpp,
> but I recall to have seen many others around)
> 
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list