Пример #1
0
func (this *Geos) Destroy(geom *Geom) {
	runtime.SetFinalizer(geom, nil)
	if geom.v != nil {
		C.GEOSGeom_destroy_r(this.v, geom.v)
		geom.v = nil
	} else {
		log.Printf("double free?")
	}
}
Пример #2
0
func cGEOSGeom_destroy(g *C.GEOSGeometry) {
	handlemu.Lock()
	defer handlemu.Unlock()
	C.GEOSGeom_destroy_r(handle, g)
}