diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-09-02 16:14:01 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-02 16:17:13 (GMT) |
commit | e4dfcd4392e5be1b5de8648fc20ff45f7faa30ca (patch) | |
tree | 8e1fbb0779b150d556b8d2807271c17090989cb6 /tests/auto/qscriptstring/tst_qscriptstring.cpp | |
parent | 03274e0f539086cbf58d3fbd8e7e126a0cc16433 (diff) | |
download | Qt-e4dfcd4392e5be1b5de8648fc20ff45f7faa30ca.zip Qt-e4dfcd4392e5be1b5de8648fc20ff45f7faa30ca.tar.gz Qt-e4dfcd4392e5be1b5de8648fc20ff45f7faa30ca.tar.bz2 |
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/tst_qscriptstring.cpp')
-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 91dcf40..87956f8 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()); } } |