[postgis-devel] [PostGIS] #1102: Memory leaks in liblwgeom ?

PostGIS trac at osgeo.org
Mon Jul 4 13:37:34 PDT 2011


#1102: Memory leaks in liblwgeom ?
---------------------+------------------------------------------------------
 Reporter:  strk     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by strk):

 The attached patch implements proper cloning of POINTARRAY elements in
 lwpoint_clone, lwline_clone and lwpoly_clone. Serialized pointlist is
 _not_ copied but simply marked as READONLY. A more integrated approach
 might be porting the readonly/non-readonly (or better _owned_/_not_owned_
 flags in the LWGEOM structure itself, but I'm not sure it'd save us much.

 Conceptual and practical reviews of the patch are welcome.
 If we like the idea, it should be better documented that lwgeom_clone does
 not copy the _serialized_points_, not the POINTARRAY (as currently
 documented).

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1102#comment:5>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list