qDebug()引起的一连串free溢出

调用类似 qDebug()<"main(), db.dbConnect() ="<<db.dbConnect();
引起程序在关闭的时候,free.c内存溢出。
qDebug doc讲,在一些平台,如果输入const char* =0的时候,可能crash掉
但现在不是这个问题,
最后发现原因是 在连接的时候输入库写成 release版本了,选择对应的debug版本就ok了(QtSql4.lib->QtSqld4.lib)。
此为记!

Leave a Reply

Your email address will not be published. Required fields are marked *