diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-09-02 18:14:01 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-02 18:17:13 +0200 |
commit | e4dfcd4392e5be1b5de8648fc20ff45f7faa30ca (patch) | |
tree | 8e1fbb0779b150d556b8d2807271c17090989cb6 /tests/auto/qscriptstring | |
parent | 03274e0f539086cbf58d3fbd8e7e126a0cc16433 (diff) |
improve memory management scheme of QScriptString(Private)
Get rid of QPointer.
Use linked list of privates (like was recently done for QScriptValue).
Allocate the private on the stack when we can.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto/qscriptstring')
-rw-r--r-- | tests/auto/qscriptstring/tst_qscriptstring.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qscriptstring/tst_qscriptstring.cpp b/tests/auto/qscriptstring/tst_qscriptstring.cpp index 91dcf40140..87956f8e06 100644 --- a/tests/auto/qscriptstring/tst_qscriptstring.cpp +++ b/tests/auto/qscriptstring/tst_qscriptstring.cpp @@ -126,11 +126,15 @@ void tst_QScriptString::test() QCOMPARE(twoInterned.toString(), two); QVERIFY(oneInterned != twoInterned); QVERIFY(!(oneInterned == twoInterned)); + QScriptString copy1(oneInterned); + QScriptString copy2 = oneInterned; delete eng2; QVERIFY(!oneInterned.isValid()); QVERIFY(!twoInterned.isValid()); + QVERIFY(!copy1.isValid()); + QVERIFY(!copy2.isValid()); } } |