exists/isdef: fix memleak introduced at 12910be3 43/20643/1
Clément DAVID [Wed, 28 Nov 2018 10:14:55 +0000 (11:14 +0100)]
Change-Id: I498adcae78622762ea5c2520ef9d4cbcce9f1ee2

scilab/modules/core/sci_gateway/cpp/sci_exists.cpp

index 85cdef9..c310c8d 100644 (file)
@@ -85,7 +85,7 @@ static types::Function::ReturnValue isdef(types::typed_list& in, int _iRetCount,
 
     types::InternalType *pIT;
     types::Bool* pBOut = new types::Bool(pStrIn->getDims(), pStrIn->getDimsArray());
-    
+
     switch (getScopeFromOption(psScope))
     {
         case All:
@@ -137,6 +137,7 @@ types::Function::ReturnValue sci_exists(types::typed_list &in, int _iRetCount, t
             pDblOut->set(i, (double) pBOut->get(i));
         }
         out.pop_back();
+        pBOut->killMe();
         out.push_back(pDblOut);
     }