delete of opt arguments corrected.
[scilab.git] / scilab / modules / ast / src / cpp / ast / runvisitor.cpp
index afa0572..38fe3f3 100644 (file)
@@ -322,10 +322,7 @@ void RunVisitorT<T>::visitprivate(const WhileExp  &e)
         //clear old result value before evaluate new one
         if (result_get() != NULL)
         {
-            if (result_get()->isDeletable())
-            {
-                delete result_get();
-            }
+            result_get()->killMe();
         }
 
         e.test_get().accept(*this);