cleanup data after file is no longer needed

This commit is contained in:
Anakin 2016-12-31 13:11:14 +01:00
parent 9a5d09b80c
commit 3758a2601c

View File

@ -62,6 +62,25 @@ public:
{
// close file
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: