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?") } }
func cGEOSGeom_destroy(g *C.GEOSGeometry) { handlemu.Lock() defer handlemu.Unlock() C.GEOSGeom_destroy_r(handle, g) }