I am new to C ++ / CLI, so please bear with me ...
I am working on a mixed C ++ / CLI DLL, which should act as a bridge between the Win32 process and the .NET assembly. In a DLL, I need some .NET material to be present throughout the life of the DLL. Initialization is not such a big problem, but I could not figure out when I can safely clear .NET stuff. Common C ++ objects (DLL_PROCESS_DETACH, global variables and static locals d'tors) seem to be called after the CLR leaves.
So, how can I get a notification that the DLL is about to disconnect from the CLR, so I can release the .NET links that I have?
source
share