[Dcmlib] Qt-interest Archive - Problem with QString <-> std::string with Qt 3.1.0

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Wed Sep 17 16:00:49 CEST 2003


D'apres google ce probleme n'est pas nouveau:

http://www.google.com/search?q=_CrtIsValidHeapPointer+string+debug&btnG=Recherche+Google&hl=fr&ie=ISO-8859-1

Ce mail est particulièrement interressant:

http://lists.trolltech.com/qt-interest/2003-01/thread00220-0.html

En gros il semble qu'il y ai des problemes si l'on melange des releases
et des debug:
[Linking against different C runtimes will pull in different C runtime

instances into the process (ie. the release C runtime from Qt, and the debug
C runtime from the application). Every C runtime instance manages it's own
heap, and can only delete objects on the same heap that they have been
allocated on. If you delete an object from a different heap (ie. that has
been allocated using operator new of a different C runtime instance) you
will get the exception (if you have the CRT code installed, see the comments
in the function the assert fails in).]


D'apres d'autre source:
http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20714608.html

L'utilisation de 'string' est dangereuse, il vaut mieux 'std::string'

Que des rejouissances en perspective ;)

my J6M's 20millions$
mathieu






More information about the Dcmlib mailing list