Is an embedded ruby interpreter safe to unload

Hello ruby-talk,

when i use ruby embedded in a program where i call "ruby_init", do a
few ruby magics and then call "ruby_finalize".

Will this free all used memory?

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

You want to call ruby_cleanup(0); instead, like ruby_stop() does.
ruby_finalize() does not deal with threads.

···

On 10 mar, 20:51, Lothar Scholz <mailingli...@scriptolutions.com> wrote:

Hello ruby-talk,

when i use ruby embedded in a program where i call "ruby_init", do a
few ruby magics and then call "ruby_finalize".

Will this free all used memory?

Hello gga,

Will this free all used memory?

You want to call ruby_cleanup(0); instead, like ruby_stop() does.
ruby_finalize() does not deal with threads.

Thanks,

i looked at the source and realize that there is no way to cleanly
shutdown the ruby interpreter. This will just call all registered exit
functions.

Very very bad because this means it's very hard to use memory leak checking
tools for extensions or much worse for systems that use ruby as an embedded
interpreter.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's