summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-11-10 18:13:36 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-17 10:17:01 +0100
commit301f7b780cbb0e5b1f6c9bf88bdb7dffe9b1110e (patch)
tree67392c05fccecdeaee6b432c6cf670361982462c /doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp
parentb3a4d3e328a3d80d4728716f2e5e68817b82cbb8 (diff)
Don't check reference count in QLinkedList<T>::free
This is a private function that was always* called after d->ref.deref() returned false to free the linked list. Still, it needlessly verified the reference count to be zero. The check is thus replaced with a Q_ASSERT to check the invariant on debug builds. *This commit also fixes an issue where free would be called on a block that hadn't been deref'ed, thus leaking the nodes. Since this was in an exception handling block, and happens before any code has a chance to reference the block the explicit deref is skipped in that case. Change-Id: Ie73c174d0a1b84f297bf5531e45f829e66a46346 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp')
0 files changed, 0 insertions, 0 deletions