Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No garbage collection at "EXIT" command #11

Closed
tira-misu opened this issue Feb 4, 2014 · 2 comments
Closed

No garbage collection at "EXIT" command #11

tira-misu opened this issue Feb 4, 2014 · 2 comments

Comments

@tira-misu
Copy link

There is no garbage collection running at Exit command. Solution is to use os.exit(1,1); on "exit" in debug_hook()

@pkulchenko
Copy link
Owner

@tira-misu, it's an interesting suggestion and should be easy to implement. I'm curious, what difference does it make? I thought the process would terminate anyway? Or is there some sort of multi-threaded environment where it's important to close Lua states? I asked the same question on the lua maillist and would love to hear what your use case is. Thanks!

@tira-misu
Copy link
Author

Im working at an embedded device. There is no process management with MMU. Allocated memory will not be deleted after process end. Another reason is that no finalizers will be called (think of open connections and so on). It seams thas os.exit(1,1) is new in Lua 5.2.

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

No branches or pull requests

2 participants