[GEOS] #944: Multiple memory leaks in SIRtreePointInRing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[GEOS] #944: Multiple memory leaks in SIRtreePointInRing

geos-2
#944: Multiple memory leaks in SIRtreePointInRing
------------------------+--------------------------
 Reporter:  dbaston     |      Owner:  geos-devel@…
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:
Component:  Default     |    Version:  master
 Severity:  Unassigned  |   Keywords:
------------------------+--------------------------
 In `SIRtreePointInRing::isInside(const Coordinate& pt)`

 A vector is never freed:

 `vector<void*> *segs=sirTree->query(pt.y);`

 In `SIRtreePointInRing::buildIndex()`

 LineSegments are added to a tree, but are never cleaned up:


 {{{
 for(std::size_t i=1; i<npts; ++i)
 {
   if(pts->getAt(i-1)==pts->getAt(i)) continue; // Optimization suggested
 by MD. [Jon Aquino]
   LineSegment *seg=new LineSegment(pts->getAt(i-1), pts->getAt(i));
   sirTree->insert(seg->p0.y, seg->p1.y, seg);
 }
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/944>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #944: Multiple memory leaks in SIRtreePointInRing

geos-2
#944: Multiple memory leaks in SIRtreePointInRing
------------------------+---------------------------
 Reporter:  dbaston     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:
Component:  Default     |     Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------
Changes (by Daniel Baston <dbaston@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"24652fb98c4da0ef41d8f21d6dd021b680e62fcd/git" 24652fb/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="24652fb98c4da0ef41d8f21d6dd021b680e62fcd"
 Fix mem leaks in SIRtreePointInRing

 Fixes #944
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/944#comment:1>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel