-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Finalizers are not called on thread exit #12192
Comments
This is possible via |
@Araq wait but why wouldn't it be by default called automatically, eg when thread exits? |
Days have only 24 hours and finalizers are "old runtime" cruft, my focus is on ARC that doesn't have this problem. |
I guess the question was: isn't fixing this a matter of replacing This bug causes leaks for those who use threads, and it's not obvious you should call |
Fine... |
When a thread exits, Nim simply deallocates GC heap without running finalizers. This results in resource leaking if the finalizers are supposed to free some foreign resources.
Finalizers must be called when:
tearDownForeignThreadGc
is called.The text was updated successfully, but these errors were encountered: