Commit 31b27f30 by Michel Rasquin

Fix calls to PView destructor for memory dealloc

parent db1901a9
Pipeline #326 passed with stage
in 9 minutes 15 seconds
......@@ -240,19 +240,15 @@ int GmshFinalize()
{
#if defined(HAVE_POST)
// Delete all PViewData stored in static list of PView class
for(unsigned int i = 0; i < PView::list.size(); i++) {
delete PView::list[i];
}
PView::list.clear();
while(PView::list.size()>0) delete PView::list[PView::list.size()-1];
std::vector<PView*>().swap(PView::list);
// Delete static _interpolationSchemes of PViewData class
PViewData::removeAllInterpolationSchemes();
#endif
// Delete all Gmodels
for(unsigned int i = 0; i < GModel::list.size(); i++)
delete GModel::list[i];
GModel::list.clear();
while(GModel::list.size()>0) delete GModel::list[GModel::list.size()-1];
std::vector<GModel*>().swap(GModel::list);
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment