Skip to content

Add API mrb_atexit().#2211

Merged
matz merged 1 commit into
mruby:masterfrom
take-cheeze:atexit
Jun 5, 2014
Merged

Add API mrb_atexit().#2211
matz merged 1 commit into
mruby:masterfrom
take-cheeze:atexit

Conversation

@take-cheeze
Copy link
Copy Markdown
Contributor

Functions registered with mrb_atexit will be called in mrb_close.
mrb_final_mrbgems will be called as mrb_state at exit function. (So it'll be static function.)
Maybe useful in #1844.

`mrb_final_mrbgems` will be called as mrb_state atexit function.
Maybe useful in mruby#1844.
@ksss
Copy link
Copy Markdown
Contributor

ksss commented May 8, 2014

Why not use proc object?
Do you have plan to implement Kernel#at_exit?

@take-cheeze
Copy link
Copy Markdown
Contributor Author

@ksss Well implementing Kernel#at_exit is not difficult.
atexit_stack will be array of mrb_value instead.
Though it won't use mrb_func_t since I want to follow *_final.

@matz matz merged commit 64300b2 into mruby:master Jun 5, 2014
@take-cheeze take-cheeze deleted the atexit branch June 7, 2014 13:31
matz added a commit that referenced this pull request Jun 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants