diff options
| author | Oz Linden <oz@lindenlab.com> | 2016-04-04 15:53:09 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2016-04-04 15:53:09 -0400 |
| commit | 9be58e915a6c69de280ccabd3019e9ac40beed26 (patch) | |
| tree | ad6f8f1f754a865afb761d0f17744cc7e1ef8b74 /indra/llcorehttp/tests/test_httpoperation.hpp | |
| parent | ab46c9226bd9048fa218f54bc8668594401529e7 (diff) | |
| parent | 18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff) | |
merge with 4.0.3-release
Diffstat (limited to 'indra/llcorehttp/tests/test_httpoperation.hpp')
| -rw-r--r-- | indra/llcorehttp/tests/test_httpoperation.hpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/llcorehttp/tests/test_httpoperation.hpp b/indra/llcorehttp/tests/test_httpoperation.hpp index 17b1a96878..e7df2337de 100644 --- a/indra/llcorehttp/tests/test_httpoperation.hpp +++ b/indra/llcorehttp/tests/test_httpoperation.hpp @@ -76,12 +76,12 @@ namespace tut mMemTotal = GetMemTotal(); // create a new ref counted object with an implicit reference - HttpOpNull * op = new HttpOpNull(); - ensure(op->getRefCount() == 1); + HttpOperation::ptr_t op (new HttpOpNull()); + ensure(op.use_count() == 1); ensure(mMemTotal < GetMemTotal()); // release the implicit reference, causing the object to be released - op->release(); + op.reset(); // make sure we didn't leak any memory ensure(mMemTotal == GetMemTotal()); @@ -96,26 +96,24 @@ namespace tut mMemTotal = GetMemTotal(); // Get some handlers - TestHandler * h1 = new TestHandler(); + LLCore::HttpHandler::ptr_t h1 (new TestHandler()); // create a new ref counted object with an implicit reference - HttpOpNull * op = new HttpOpNull(); + HttpOperation::ptr_t op (new HttpOpNull()); // Add the handlers - op->setReplyPath(NULL, h1); + op->setReplyPath(LLCore::HttpOperation::HttpReplyQueuePtr_t(), h1); // Check ref count - ensure(op->getRefCount() == 1); + ensure(op.unique() == 1); // release the reference, releasing the operation but // not the handlers. - op->release(); - op = NULL; + op.reset(); ensure(mMemTotal != GetMemTotal()); // release the handlers - delete h1; - h1 = NULL; + h1.reset(); ensure(mMemTotal == GetMemTotal()); } |
