Opened 5 years ago

Closed 5 years ago

#944 closed defect (fixed)

Multiple memory leaks in SIRtreePointInRing

Reported by: dbaston Owned by: geos-devel@…
Priority: major Milestone:
Component: Default Version: main
Severity: Unassigned Keywords:
Cc:

Description

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);
}

Change History (1)

comment:1 by Daniel Baston <dbaston@…>, 5 years ago

Resolution: fixed
Status: newclosed

In 24652fb/git:

Fix mem leaks in SIRtreePointInRing

Fixes #944

Note: See TracTickets for help on using tickets.