diff options
Diffstat (limited to 'sal/qa/rtl/oustring/rtl_OUString2.cxx')
-rw-r--r-- | sal/qa/rtl/oustring/rtl_OUString2.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index 84859d1a4789..6a3e32eb6523 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -893,9 +893,7 @@ public: // Test interning lots of things int i; static const int nSequence = 4096; - rtl::OUString *pStrs; - - pStrs = new rtl::OUString[nSequence]; + std::unique_ptr<rtl::OUString[]> pStrs(new rtl::OUString[nSequence]); for (i = 0; i < nSequence; i++) { pStrs[i] = rtl::OUString::number( sqrt( static_cast<double>(i) ) ).intern(); @@ -906,7 +904,6 @@ public: CPPUNIT_ASSERT_EQUAL_MESSAGE("double intern failed", pStrs[i].pData, aNew.pData); } - delete [] pStrs; } CPPUNIT_TEST_SUITE(construction); |