[geos-devel] JTS/GEOS performance - smart-ptr vs ref counting

Martin Davis mbdavis at VividSolutions.com
Mon Jan 31 20:50:34 EST 2005


Hmmm...    I don't fully understand this scheme, but there seems to be
some warning on this page about using circular references:

"If circular referencing is possible, it is necessary to carefully use
simple pointers when it is known that the the object will be referenced
by another ref_ptr in the current scope. "

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.      www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046


> -----Original Message-----
> From: Norman Vine [mailto:nhv at cape.com] 
> Sent: January 31, 2005 5:49 PM
> To: Martin Davis
> Subject: RE: [geos-devel] JTS/GEOS performance - smart-ptr vs 
> ref counting
> 
> 
> This is a reasonable summary 
> http://dburns.dhs.org/OSG/Articles/RefPointers/RefPointers.html
> 
> > -----Original Message-----
> > From: Martin Davis [mailto:mbdavis at VividSolutions.com]
> > Sent: Monday, January 31, 2005 8:37 PM
> > To: nhv at cape.com
> > Subject: RE: [geos-devel] JTS/GEOS performance - smart-ptr vs ref 
> > counting
> > 
> > 
> > Do you have a reference that explains this, Norman?  I 
> always thought 
> > that self-referential structures were the classic case that 
> > ref-counting couldn't handle.  (And when I google 
> "reference counting 
> > self referential" I find an awful lot of web pages that say the same
> > thing...)
> > 
> > Martin Davis, Senior Technical Architect
> > Vivid Solutions Inc.      www.vividsolutions.com
> > Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
> > Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> > 
> > 
> > > -----Original Message-----
> > > From: Norman Vine [mailto:nhv at cape.com]
> > > Sent: January 31, 2005 4:55 PM
> > > To: GEOS Development List
> > > Subject: RE: [geos-devel] JTS/GEOS performance - smart-ptr vs 
> > > ref counting
> > > 
> > > 
> > > Martin Davis writes:
> > > >
> > > > It's just occurred to me that a classic issue with 
> ref-counting is
> > > > being able to handle self-referential data structures.  
> Some of the 
> > > > data structures in JTS/GEOS are inherently 
> self-referential (e.g. 
> > > > topology graphs).  Is there a standard pattern for 
> coping with this 
> > > > kind of problem?
> > > 
> > > The standard method of using ref/smartpointers works just fine :-)
> > > 
> > > Norman
> > > 
> > > _______________________________________________
> > > 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