summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/db2/qsql_db2.h
diff options
context:
space:
mode:
authorJian Liang <jianliang79@gmail.com>2013-01-14 10:39:56 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-14 11:35:17 +0100
commitb188d9481b98680deb7f44fb41f8eafce18aedab (patch)
tree7658a19d1839cf9705560efda1fb1c7339b5e422 /src/sql/drivers/db2/qsql_db2.h
parent4bd4c811f230c84a92f792e2d5c87fae407d1db4 (diff)
Fix QOpenGLContextGroup object leak
Task-number: QTBUG-29056 QOpenGLContextGroup object is designed to be destroyed by deleteLater(), but this method will not always work due to the fact that in many cases event loop will exit before the deferred deletion of the QOpenGLContextGroup object is queued. Think about the following case: int main(int argc, char *argv[]) { QApplication a(argc, argv); QGLWidget w; w.show(); return a.exec(); } In the above program, the event loop will exit before QGLWidget object's destruction. This will cause the QOpenGLContextGroup object hold by QGLWidget object never been deleted. This patch will delete QOpenGLContextGroup object directly with delete operator if the current thread is the same as the thread which the QOpenGLContextGroup lives in. Change-Id: If835d7482474f4a668763fc7c21b293a27f075fd Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/sql/drivers/db2/qsql_db2.h')
0 files changed, 0 insertions, 0 deletions