From 52b5d76a6b0c5e4c779211fdf7bca56d87a2f83e Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 23 Sep 2014 15:31:56 +0000 Subject: py: Free non-interned strings in the parser when not needed. mp_parse_node_free now frees the memory associated with non-interned strings. And the parser calls mp_parse_node_free when discarding a non-used node (such as a doc string). Also, the compiler now frees the parse tree explicitly just before it exits (as opposed to relying on the caller to do this). Addresses issue #708 as best we can. --- stmhal/pyexec.c | 1 - 1 file changed, 1 deletion(-) (limited to 'stmhal') diff --git a/stmhal/pyexec.c b/stmhal/pyexec.c index cac6f0cf0..01c0173ef 100644 --- a/stmhal/pyexec.c +++ b/stmhal/pyexec.c @@ -71,7 +71,6 @@ bool parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t input_kind, bo mp_lexer_free(lex); mp_obj_t module_fun = mp_compile(pn, source_name, MP_EMIT_OPT_NONE, is_repl); - mp_parse_node_free(pn); if (module_fun == mp_const_none) { return false; -- cgit v1.2.3