]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdExecBbiCommand.cxx
*** empty log message ***
[bbtk.git] / packages / std / src / bbstdExecBbiCommand.cxx
index feb9588e2b7502e5cd8bdf3b63b616a4eaa4a4ab..af65ae7aa897b9b7af07e6bb796049e05b7f5a6d 100755 (executable)
@@ -18,7 +18,8 @@ namespace bbstd
     {
       // Look for the interpreter
       bbtk::Interpreter* I = 0;
-      if (bbGetParent() != 0) 
+         bool delete_inter = false; 
+         if (bbGetParent() != 0) 
        {
          bbtk::Factory* f = ((bbtk::ComplexBlackBoxDescriptor*)bbGetParent()
                        ->bbGetDescriptor())->GetFactory();
@@ -32,6 +33,7 @@ namespace bbstd
        {
          //      bbtkError("ExecBbiCommand::DoProcess() : could not find interpreter");
          I = new bbtk::Interpreter();
+         delete_inter = true; 
        }
 
       int i;
@@ -56,14 +58,14 @@ namespace bbstd
                  ccommand[i]=34;
                }
            }           
-         bool insideComment = false; // for multiline comment
-         I->InterpretLine( ccommand, insideComment);
+       
+         I->InterpretLine( ccommand );
          pos1=pos2+1;
          pos2 = bbGetInputIn().find(";",pos2+1);
          
        }
       
-      
+      if (delete_inter) delete I;
       
       /*  Grrr  not works in windows
        char * pch;