ddovod / jet-live

c++ hot code reload for linux and macos
MIT License
411 stars 23 forks source link

Constructors of "old" statics in the library with new code should not be called #25

Open ddovod opened 5 years ago

ddovod commented 5 years ago

Since we don't use "old" statics from the library with new code (statics that are already living in the app), we should somehow prevent double initialization, but keep new statics constructors. This is not important for primitive types, but for complex structures with non-trivial constructors it is essential. This is related only to global variables cause their constructors are called before dlopen returns and so have no chance to fix relocations for them.