[geos-devel] GEOS 2.2.2 C API + Reference counter

strk at refractions.net strk at refractions.net
Sat Jul 1 08:05:07 EDT 2006


Don't we get the same effect by just making sure the global
geometryFactory is set to 0 after deletion ?

--strk;

On Sat, Jul 01, 2006 at 01:23:33PM +0200, Mateusz Loskot wrote:
> Hi,
> 
> As we talked yesterday, I applied small changes
> with reference counter to make
> initGEOS/finishGEOS more safe.
> I applied those changes to GEOS 2.2.2.
> 
> Here is the package with geos_c.h/cpp files:
> 
> http://mateusz.loskot.net/tmp/geos-capi-refcounted.tar.bz2
> 
> Original version of GEOS 2.2.2 crashes in following situation:
> 
> initGEOS(NULL, NULL);
> finishGEOS();
> finishGEOS(); // <--- BUM!
> 
> Now, changes described above, make it safe to call init/finishGEOS
> multiple time, no matter in what order.
> 
> I think this small patch could be applied to GEOS 2.2.2 as a backport.
> 
> If case of comments, just give me a note.
> 
> Cheers
> -- 
> Mateusz Loskot
> http://mateusz.loskot.net
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel


-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the geos-devel mailing list