mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix memory leak
git-svn-id: http://svn.osgeo.org/qgis/trunk@14173 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
94f418a180
commit
b33d801285
@ -869,7 +869,10 @@ namespace pal
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( total_distance == 0 )
|
if ( total_distance == 0 )
|
||||||
|
{
|
||||||
|
delete[] path_distances;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
LinkedList<LabelPosition*> *positions = new LinkedList<LabelPosition*> ( ptrLPosCompare );
|
LinkedList<LabelPosition*> *positions = new LinkedList<LabelPosition*> ( ptrLPosCompare );
|
||||||
double delta = max( f->labelInfo->label_height, total_distance / 10.0 );
|
double delta = max( f->labelInfo->label_height, total_distance / 10.0 );
|
||||||
@ -941,6 +944,7 @@ namespace pal
|
|||||||
( *lPos )[i] = positions->pop_front();
|
( *lPos )[i] = positions->pop_front();
|
||||||
}
|
}
|
||||||
delete positions;
|
delete positions;
|
||||||
|
delete[] path_distances;
|
||||||
|
|
||||||
return nbp;
|
return nbp;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user