[Development] thread_local: replacing GCC with Clang for MinGW

Thiago Macieira thiago.macieira at intel.com
Mon Aug 26 16:52:13 CEST 2019


On Monday, 26 August 2019 00:42:52 PDT Olivier Goffart wrote:
> > People using std::thread are unlikely to be using QThreadStorage. If they
> > have a problem with thread_local and want to use QThreadStorage, they can
> > change the thread start too.
> 
> This is not only about QThreadStorage. The QAdoptedThread is leaking as
> well. So any use of Qt API that uses QObject (e.g: creating a QFile or a
> QTextStream on the stack) will be leaking some memory if it is not done in
> a QThread.

I thought we had a DllMain solution for freeing the QAdoptedThread in static 
builds.

Ugh... in static builds there *is* no DLL.

Ok, that seems like a worthwhile objective.

> (I did not know about this leak before reading your earlier message. I
> thought we had cleanup in place like for Unix. But I verified and indeed,
> it seems that we do not have thread cleanup in place for Windows)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Development mailing list