Skip to content
Snippets Groups Projects
Commit 31b27f30 authored by Michel Rasquin's avatar Michel Rasquin
Browse files

Fix calls to PView destructor for memory dealloc

parent db1901a9
No related branches found
No related tags found
No related merge requests found
...@@ -240,19 +240,15 @@ int GmshFinalize() ...@@ -240,19 +240,15 @@ int GmshFinalize()
{ {
#if defined(HAVE_POST) #if defined(HAVE_POST)
// Delete all PViewData stored in static list of PView class // Delete all PViewData stored in static list of PView class
for(unsigned int i = 0; i < PView::list.size(); i++) { while(PView::list.size()>0) delete PView::list[PView::list.size()-1];
delete PView::list[i];
}
PView::list.clear();
std::vector<PView*>().swap(PView::list); std::vector<PView*>().swap(PView::list);
// Delete static _interpolationSchemes of PViewData class // Delete static _interpolationSchemes of PViewData class
PViewData::removeAllInterpolationSchemes(); PViewData::removeAllInterpolationSchemes();
#endif #endif
// Delete all Gmodels // Delete all Gmodels
for(unsigned int i = 0; i < GModel::list.size(); i++) while(GModel::list.size()>0) delete GModel::list[GModel::list.size()-1];
delete GModel::list[i];
GModel::list.clear();
std::vector<GModel*>().swap(GModel::list); std::vector<GModel*>().swap(GModel::list);
return 1; return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment