c3c
c3c copied to clipboard
@finalizer doesn't been called
Tried the handbook @finalizer with below code snippets but found that @finalizer statement doen't been called under win10 64 bit:
module init_fin;
import std::io;
fn void run_at_startup() @init
{
io::printn("Initializer... called!");
}
fn void run_at_shutdown() @finalizer
{
io::printn("Finalizer... called!");
}
fn int main(String[])
{
io::printn("Hello world!");
return 0;
}
Output:
Initializer... called!
Hello world!
Yes, this is a known problem which is currently investigated.
Thank you for filing the issue, because I think we forgot to do that. Unfortunately the solution isn't simple.
This should now work, please check.
This should now work, please check.
Yes,it works.Thanks for letting me know.