delete of opt arguments corrected.
[scilab.git] / scilab / modules / ast / src / cpp / system_env / configvariable.cpp
index dcc82d6..8ebc53f 100644 (file)
@@ -555,7 +555,7 @@ void ConfigVariable::deleteThread(__threadKey _key)
             (*it)->DecreaseRef();
             if ((*it)->isDeletable())
             {
-                delete (*it);
+                (*it)->killMe();
                 (*it) = NULL;
                 m_threadList.erase(it);
                 return;