I’d like to embed ruby into a C program. Are there any potential
memory leaks regarding rb_str_new(), rb_define_readonly_variable(),
etc.?
How can I be sure that the objects generated by rb_str_new() get
cleaned up? Are there any old references left when I call
rb_define_readonly_variable() more than once with the same variable,
but different data?
I'd like to embed ruby into a C program. Are there any potential
memory leaks regarding rb_str_new(), rb_define_readonly_variable(),
etc.?
no,
How can I be sure that the objects generated by rb_str_new() get
cleaned up? Are there any old references left when I call
rb_define_readonly_variable() more than once with the same variable,
but different data?
How can I be sure that the objects generated by rb_str_new() get
cleaned up? Are there any old references left when I call
rb_define_readonly_variable() more than once with the same variable,
but different data?
ruby use a mark/sweep garbage collector
VALUE foo = rb_str_new2(“bar”);
…
Some steps later … How do I know that the mark/sweep garbage
collector hasn’t removed my new object?