Itseez/opencv — pull request #2594 by arkunze (2014-04-08 23:46:51+00:00)
Title: Resolves bug #3450 (Improperly cleaning up resources in DllMain)

Avoids freeing resources in DllMain on Windows in the case where the whole process is terminating. According to Win32 API documentation, it is not legal:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583.aspx

Resolves bug #3450.