cleanup data after file is no longer needed
This commit is contained in:
parent
9a5d09b80c
commit
3758a2601c
|
@ -62,6 +62,25 @@ public:
|
||||||
{
|
{
|
||||||
// close file
|
// close file
|
||||||
m_file.close();
|
m_file.close();
|
||||||
|
|
||||||
|
//clean up
|
||||||
|
m_textureNames->clear();
|
||||||
|
delete m_textureNames;
|
||||||
|
|
||||||
|
for (Model* modelIt : *m_models)
|
||||||
|
{
|
||||||
|
for (Segment* segIt : modelIt->segmList)
|
||||||
|
{
|
||||||
|
segIt->indices.clear();
|
||||||
|
segIt->vertices.clear();
|
||||||
|
delete segIt;
|
||||||
|
}
|
||||||
|
modelIt->segmList.clear();
|
||||||
|
|
||||||
|
delete modelIt;
|
||||||
|
}
|
||||||
|
m_models->clear();
|
||||||
|
delete m_models;
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue