mmozeiko
4) Global objects with C++ constructors and destructors - it's possible to implement it, but it's not needed for us.
I have a couple of global objects, from a very simple template structure I created for DirectX COM objects, just to take advantage of destructor to call ->Release() in the COM objects, since I hate keeping track of each one I create, and I don't like the warnings that DirectX Debug Layer gives me if I don't Release them. So, without the CRT, I'm having a
error LNK2019: unresolved external symbol atexit referenced in function "void __cdecl `dynamic atexit destructor which I can guess is the exact same problem you mention in item 4).
How can I work around this? How to implement
atexit? Also, since we use
ExitProcess() to exit, how will the destructors be called? Is it where
atexit comes in?
EDIT:
I just found the definition of the
atexit function:
| int atexit(
void (__cdecl *func )( void )
);
|
Didn't know it is at stdlib.h