mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
change example code to do mrb_close()
I was hoping this would cause valgrind to complain less, but there is still a lot of memory leaked (does mrb_close() actually free all of the managed blocks?) Anyway this helps somewhat and is good practice
This commit is contained in:
@@ -130,6 +130,7 @@ cleanup(mrb_state *mrb, struct _args *args)
|
||||
mrb_free(mrb, args->cmdline);
|
||||
if (args->argv)
|
||||
mrb_free(mrb, args->argv);
|
||||
mrb_close(mrb);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user