diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-24 14:32:40 -0800 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-24 14:32:40 -0800 |
commit | ceb87835fe24873cd8b2f7d1d3d88cb6144e33b8 (patch) | |
tree | be3e0b2da874ab98f98a4fd756ff8534f74b5b6d /py/compile.c | |
parent | 4461970da027ce16b41189f75257239f46a3b087 (diff) | |
parent | f46d87a30d09bfa904c2b9769ea52271abb86b0c (diff) | |
download | micropython-ceb87835fe24873cd8b2f7d1d3d88cb6144e33b8.tar.gz micropython-ceb87835fe24873cd8b2f7d1d3d88cb6144e33b8.zip |
Merge pull request #217 from pfalcon/free-emitter
Add support for freeing code emitter objects at the end of compilation.
Diffstat (limited to 'py/compile.c')
-rw-r--r-- | py/compile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/compile.c b/py/compile.c index 7e77832bc3..e8a5197841 100644 --- a/py/compile.c +++ b/py/compile.c @@ -3155,6 +3155,9 @@ mp_obj_t mp_compile(mp_parse_node_t pn, qstr source_file, bool is_repl) { } bool had_error = comp->had_error; + if (comp->emit_method_table->free != NULL) { + comp->emit_method_table->free(comp->emit); + } m_del_obj(compiler_t, comp); uint unique_code_id = module_scope->unique_code_id; for (scope_t *s = module_scope; s;) { |