You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an exception when debug with function ToWKT, // Fetch geometry as WKT func (geom Geometry) ToWKT() (string, error) { var p *C.char err := C.OGR_G_ExportToWkt(geom.cval, &p).Err() wkt := C.GoString(p) defer C.free(unsafe.Pointer(p)) // <--- Exception at this line return wkt, err }
I think this pointer should be release by use CPLFree. And I try to change C.free to C.CPLFree, it works.
The text was updated successfully, but these errors were encountered:
I got an exception when debug with function ToWKT,
// Fetch geometry as WKT func (geom Geometry) ToWKT() (string, error) { var p *C.char err := C.OGR_G_ExportToWkt(geom.cval, &p).Err() wkt := C.GoString(p) defer C.free(unsafe.Pointer(p)) // <--- Exception at this line return wkt, err }
I think this pointer should be release by use CPLFree. And I try to change C.free to C.CPLFree, it works.
The text was updated successfully, but these errors were encountered: