[geos-devel] Exposing Precision model through C-API

Sandro Santilli strk at keybit.net
Fri Mar 7 06:49:05 PST 2014


On Fri, Mar 07, 2014 at 07:57:49PM +0530, Varun Saraf wrote:
> Hi,
> 
> Currently, how is a GeometryFactory deleted and under what circumstances is
> the finishGEOS function called? Given a GeometryFactory needs to stay alive
> as long as any geometry that has been constructed with that factory. How
> can we be sure that no geometry is still active which was created using
> this GeometryFactory?

The finishGEOS_r function is supposedly called when the user is no longer
willing to use a specific "context". The finishGEOS function is supposedly
called when the user is no longer willing to use the library, until next
call to initGEOS. That's how they are documented.

One way to track created geometries would be putting them in a list on
creation and dropping them off the list when destructed (there's a C-API
endpoint for deleting them). But some geometries are created "internally",
as the result of operations. Those geometries would be harder to get on 
that list.

Would such tracking list be worth it ? Or better to just document the
problem and let the user be able to shoot their feet ? 

--strk;


More information about the geos-devel mailing list