فهرست منبع

minor memory fix

Ken Martin 23 سال پیش
والد
کامیت
85896b3460
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Source/cmMakefile.cxx

+ 2 - 2
Source/cmMakefile.cxx

@@ -96,12 +96,12 @@ cmMakefile::~cmMakefile()
     }
   std::list<cmFunctionBlocker *>::iterator pos;
   for (pos = m_FunctionBlockers.begin(); 
-       pos != m_FunctionBlockers.end(); pos = m_FunctionBlockers.begin())
+       pos != m_FunctionBlockers.end(); ++pos)
     {
     cmFunctionBlocker* b = *pos;
-    m_FunctionBlockers.remove(*pos);
     delete b;
     }
+  m_FunctionBlockers.clear();
 }
 
 void cmMakefile::PrintStringVector(const char* s, const std::vector<std::string>& v) const