Free eval's code and literal hash-table after its execution if it does not contain functions.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
Andrey Shitov
2015-08-19 20:13:26 +03:00
parent 13941df8dd
commit 01604974e3
5 changed files with 60 additions and 0 deletions
+5
View File
@@ -158,6 +158,11 @@ ecma_op_eval_chars_buffer (const jerry_api_char_t *code_p, /**< code characters
JERRY_ASSERT (ecma_is_completion_value_throw (completion));
}
if (!parser_is_code_contains_functions ())
{
serializer_remove_instructions (instrs_p);
}
ecma_deref_object (lex_env_p);
ecma_free_value (this_binding, true);
}