Destruction of Native Objects with Static Storage Duration
问题 2012-12-09 Summary: In a normal mixed-mode application global native C++ destructors run as finalizers. It's not possible to change that behavior or the associated timeout. A mixed-mode assembly DLL runs C++ constructors/destructors during DLL load/unload - exactly as a native DLL. Hosting the CLR in a native executable using the COM interface allows both the deconstructors to behave as in a native DLL (the behavior I desire) and setting the timeout for finalizers (an added bonus). As far as