summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-08-10 15:11:25 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-08-10 15:11:25 (GMT)
commit05b9dc5a1cc649231b29807f2a87bb7164c5234a (patch)
tree3d0067d99285236546a609c8da77e634ad89c050 /examples
parent44ebcef5b96c4c3478c7629836ed55e83493fd17 (diff)
downloadQt-05b9dc5a1cc649231b29807f2a87bb7164c5234a.zip
Qt-05b9dc5a1cc649231b29807f2a87bb7164c5234a.tar.gz
Qt-05b9dc5a1cc649231b29807f2a87bb7164c5234a.tar.bz2
Fix memory leak in QtScript variable object
The d-pointer is of type JSVariableObjectData*, but JSVariableObjectData doesn't have a virtual destructor. Hence we must cast the d-pointer to our subclass when deleting. In particular, this will ensure that the destructor of the symbolTable member is called, which will deallocate the table storage. (For QScriptActivationObject this did not cause a leak in practice, because its symbolTable is always empty, and JSC's hash table uses lazy allocation.) Task-number: QTBUG-12479 Reviewed-by: Olivier Goffart
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions