Просмотр исходного кода

Merge pull request #56 from mjunix/patch-8

Release memory
Peter Robinson 2 лет назад
Родитель
Сommit
206b059944
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      engine/source/console/metaScripting_ScriptBinding.cc

+ 2 - 2
engine/source/console/metaScripting_ScriptBinding.cc

@@ -571,7 +571,7 @@ ConsoleFunctionWithDocs(exec, ConsoleBool, 2, 4, ( fileName, [nocalls]?, [journa
 
 
         if ( scriptExecutionEcho )
         if ( scriptExecutionEcho )
             Con::printf("Loaded compiled script %s. Took %.0f ms", scriptFileName, etf);
             Con::printf("Loaded compiled script %s. Took %.0f ms", scriptFileName, etf);
-
+	delete code;
       ret = true;
       ret = true;
    }
    }
    else if(rScr) //Luma : Load normal cs file here.
    else if(rScr) //Luma : Load normal cs file here.
@@ -595,7 +595,7 @@ ConsoleFunctionWithDocs(exec, ConsoleBool, 2, 4, ( fileName, [nocalls]?, [journa
          
          
         if ( scriptExecutionEcho )
         if ( scriptExecutionEcho )
             Con::printf("Executed %s. Took %.0f ms", scriptFileName, etf);
             Con::printf("Executed %s. Took %.0f ms", scriptFileName, etf);
-
+	delete newCodeBlock;
          ret = true;
          ret = true;
    }
    }
    else
    else