Clear root scope on free to prevent internal function circular refs.

This commit is contained in:
Danila Fedorin 2018-05-31 19:45:36 -07:00
parent 19416d0e15
commit 6cc43449c5

View File

@ -379,6 +379,7 @@ libab_result libab_run(libab* ab, const char* string, libab_ref* value) {
} }
libab_result libab_free(libab* ab) { libab_result libab_free(libab* ab) {
libab_table_free(libab_ref_get(&ab->table));
libab_ref_free(&ab->table); libab_ref_free(&ab->table);
libab_ref_free(&ab->type_num); libab_ref_free(&ab->type_num);
libab_ref_free(&ab->type_function_list); libab_ref_free(&ab->type_function_list);