lang: Free modules after loading is finished
This commit is contained in:
parent
b16fff1702
commit
7331bd1f0e
1 changed files with 1 additions and 1 deletions
|
@ -26,6 +26,7 @@ static void test_rational(VmState state) {
|
|||
|
||||
static void test_module(VmState state) {
|
||||
Object module = module_find(state, "Main");
|
||||
modules_free(state);
|
||||
vm_stack_push(state, object_none());
|
||||
vm_call(state, module, "MakeNumber", 1);
|
||||
Object ratioA = vm_stack_pop(state);
|
||||
|
@ -62,7 +63,6 @@ int lang_main(void) {
|
|||
VmState state = vm_create();
|
||||
test_rational(state);
|
||||
test_module(state);
|
||||
modules_free(state);
|
||||
vm_destroy(&state);
|
||||
printf("All done!\n");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue