[geos-devel] CGAlgoritms singleton
paul at toolscenter.org
Thu May 19 04:41:53 EDT 2005
The new JTS simply uses static methods, hope you have seen that too.
> -----Original Message-----
> From: geos-devel-bounces at geos.refractions.net
> [mailto:geos-devel-bounces at geos.refractions.net] On Behalf Of
> strk at refractions.net
> Sent: Thursday, May 19, 2005 4:42 PM
> To: geos-devel at geos.refractions.net
> Subject: Re: [geos-devel] CGAlgoritms singleton
> Actually, if there's no state, why not using a namespace instead ?
> 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
> geos-devel mailing list
> geos-devel at geos.refractions.net
More information about the geos-devel