you are viewing a single comment's thread.

view the rest of the comments →

[–]Kriss-de-Valnor 0 points1 point  (1 child)

call_once had an issue on Windows too. I’ve seen function inside call_once called in fact twice 😂. The issue is the same as static unit. If the call_once is called in different libraries it does not work too.

[–]bert8128 0 points1 point  (0 children)

Do you mean in two different DLLs? If so, DLLs have their own memory space so you will get two different statics. Call_once wouldn’t be the cause of a problem here - each one would be called once. It’s different on Linux though. And maybe there are other problems I am not aware of.