1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-05 22:33:21 +02:00

Free the QVector/QList memory where memory should be released

This commit is contained in:
Martin Tůma 2024-09-28 19:49:42 +02:00
parent 5d86852299
commit 7b516ca5e4
6 changed files with 13 additions and 13 deletions

View File

@ -22,7 +22,7 @@ static qint16 limit(const DEMTile *tile, quint16 factor)
void DEMFile::clear()
{
_levels.clear();
_levels = QVector<Level>();
}
bool DEMFile::load(Handle &hdl)

View File

@ -336,8 +336,8 @@ void Atlas::unload()
for (int i = 0; i < _maps.count(); i++)
_maps.at(i)->unload();
_zooms.clear();
_bounds.clear();
_zooms = QVector<Zoom>();
_bounds = QVector<Bounds>();
}
Map *Atlas::createTAR(const QString &path, const Projection &proj, bool *isDir)

View File

@ -125,7 +125,7 @@ void JNXMap::clearTiles()
{
for (int i = 0; i < _zooms.size(); i++) {
Zoom *z = _zooms[i];
z->tiles.clear();
z->tiles = QVector<Tile>();
z->tree.RemoveAll();
}
}

View File

@ -445,7 +445,7 @@ void KMZMap::load(const Projection &in, const Projection &out,
void KMZMap::unload()
{
_bounds.clear();
_bounds = QVector<Bounds>();
delete _zip;
_zip = 0;

View File

@ -478,7 +478,7 @@ void MapData::clearTiles()
}
qDeleteAll(_tiles);
_tiles.clear();
_tiles = QList<TileTree*>();
}
bool MapData::pathCb(VectorTile *tile, void *context)

View File

@ -763,13 +763,13 @@ void Style::load(const MapData &data, qreal ratio)
void Style::clear()
{
_paths.clear();
_circles.clear();
_pathLabels.clear();
_pointLabels.clear();
_areaLabels.clear();
_symbols.clear();
_lineSymbols.clear();
_paths = QList<PathRender>();
_circles = QList<CircleRender>();
_pathLabels = QList<TextRender>();
_pointLabels = QList<TextRender>();
_areaLabels = QList<TextRender>();
_symbols = QList<Symbol>();
_lineSymbols = QList<Symbol>();
}
QList<const Style::PathRender *> Style::paths(int zoom, bool closed,