inconsistent ownerhips rules from liblwgeom mediated GEOS constructive functions
|Reported by:||strk||Owned by:||strk|
The functions lwgeom_clip_by_rect, lwgeom_difference, lwgeom_symdifference, lwgeom_intersection, lwgeom_unaryunion, lwgeom_linemerge (and maybe others) contain short-circuits that simply return a clone of one of the arguments, but the clone is not deep so that the caller doesn't know if the arguments can be freely released w/out destroying the return.
For consistency reasons it'd be good to always give the caller a fully owned object.
I think this problem goes back as long as 2.0, but not sure if it is worth fixing that much in the past.