diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-04-01 06:18:49 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-04-01 06:18:49 +0300 |
commit | 0ff6fa576a653597d0e9dda7f1de5f568e8d6829 (patch) | |
tree | 21e1b8f1253eedc1cc844553dcf46fef390d5a7d /indra/llcorehttp/tests/test_httpoperation.hpp | |
parent | a04341efaa63cd6bc47db25c1e4b4bf1e31d90a8 (diff) | |
parent | eb413ec41e6ee49055464a636a73a7243c172c67 (diff) |
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/llcorehttp/tests/test_httpoperation.hpp')
-rwxr-xr-x | 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 100755 --- 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()); } |