Ken Alverson wrote:
Is there a discussion somewhere on how to do this and what problems (specifically) it can cause? I did a few searches and found lots of talk on why it isn't done, but not specifically what happens if you defy it.
Well, the discussions tell you why it isn't done, so surely that leads you onto what will happen if you use a .lib :) AFAICT, (and this is my basic understanding of the problem) is that using a DLL is the only way to perform cleanup when a thread exits (as the only callback is to the DLLEntryPoint to say a thread has finished). So if you don't run it as a DLL, no clean-up occurs when a thread exits. We only ever create threads at startup and let them exit at shutdown, so I'm willing to risk what leaks could occur due to this. Cheers Russell