mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Free the QVector/QList memory where memory should be released
This commit is contained in:
parent
5d86852299
commit
7b516ca5e4
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -478,7 +478,7 @@ void MapData::clearTiles()
|
||||
}
|
||||
|
||||
qDeleteAll(_tiles);
|
||||
_tiles.clear();
|
||||
_tiles = QList<TileTree*>();
|
||||
}
|
||||
|
||||
bool MapData::pathCb(VectorTile *tile, void *context)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user