浏览代码

Free memory

Johan Mattsson 2 年之前
父节点
当前提交
92255eae14
共有 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 )
             Con::printf("Loaded compiled script %s. Took %.0f ms", scriptFileName, etf);
-
+	delete code;
       ret = true;
    }
    else if(rScr) //Luma : Load normal cs file here.
@@ -595,7 +595,7 @@ ConsoleFunctionWithDocs(exec, ConsoleBool, 2, 4, ( fileName, [nocalls]?, [journa
          
         if ( scriptExecutionEcho )
             Con::printf("Executed %s. Took %.0f ms", scriptFileName, etf);
-
+	delete newCodeBlock;
          ret = true;
    }
    else