summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qstring/tst_qstring_mac.mm')
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring_mac.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm b/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
index 9061b6c39d..4cec5b3798 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
+++ b/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
@@ -63,17 +63,23 @@ void tst_QString_macTypes()
}
// QString <-> NSString
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
QString qtString("test string");
const NSString *nsString = qtString.toNSString();
QCOMPARE(QString::fromNSString(nsString), qtString);
- [nsString release];
+
+ [pool release];
}
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
QString qtString("test string");
const NSString *nsString = qtString.toNSString();
QString qtStringCopy(qtString);
qtString = qtString.toUpper(); // modify
QCOMPARE(QString::fromNSString(nsString), qtStringCopy);
- [nsString release];
+
+ [pool release];
}
}