Shutdown Handling: DLL & Shared Object Detachment?

Benji Smith dlanguage at benjismith.net
Mon Sep 1 15:50:53 PDT 2008


Sergey Gromov wrote:
> The problem is, if DETACH is called because a process terminates, the 
> order of uninitializing process DLLs is unknown, not unlike the order of 
> collecting objects by GC is unknown. It may happen that sockets library 
> is already uninitialized. Basically you cannot do anything sophisticated 
> in DllMain which is discussed in the above article.

That's good to know. I'll avoid anything fancy in my detach handler. I 
assume file IO is safe?

--benji


More information about the Digitalmars-d-learn mailing list