summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-07-08 10:01:27 -0700
committerRider Linden <rider@lindenlab.com>2015-07-08 10:01:27 -0700
commit1138c57f9a8553903199e727912d7f1b092697e4 (patch)
tree4414279316808fa7d778eb64540ba6dff07465e0 /indra/newview/lltexturefetch.cpp
parent6689c92400a42bfc005f91b00c06601c508eac64 (diff)
Convert LLCore::HttpHeaders to use shared_ptr<> rather than an intrusive_ptr<> for refrence counting.
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rwxr-xr-xindra/newview/lltexturefetch.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f4b1ff7313..1055216b65 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2511,9 +2511,9 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mHttpRequest(NULL),
mHttpOptions(NULL),
mHttpOptionsWithHeaders(NULL),
- mHttpHeaders(NULL),
+ mHttpHeaders(),
mHttpPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
- mHttpMetricsHeaders(NULL),
+ mHttpMetricsHeaders(),
mHttpMetricsPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mTotalCacheReadCount(0U),
mTotalCacheWriteCount(0U),
@@ -2531,10 +2531,10 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mHttpOptions = new LLCore::HttpOptions;
mHttpOptionsWithHeaders = new LLCore::HttpOptions;
mHttpOptionsWithHeaders->setWantHeaders(true);
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_TEXTURE);
- mHttpMetricsHeaders = new LLCore::HttpHeaders;
+ mHttpMetricsHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpMetricsHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpMetricsPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_REPORTING);
mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER;
@@ -2580,18 +2580,6 @@ LLTextureFetch::~LLTextureFetch()
mHttpOptionsWithHeaders = NULL;
}
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
-
- if (mHttpMetricsHeaders)
- {
- mHttpMetricsHeaders->release();
- mHttpMetricsHeaders = NULL;
- }
-
mHttpWaitResource.clear();
delete mHttpRequest;
@@ -4162,7 +4150,7 @@ LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextur
mFetcher(fetcher),
mTextureCache(cache),
mImageDecodeThread(imagedecodethread),
- mHttpHeaders(NULL),
+ mHttpHeaders(),
mHttpPolicyClass(fetcher->getPolicyClass()),
mNbCurlCompleted(0),
mTempIndex(0),
@@ -4176,11 +4164,6 @@ LLTextureFetchDebugger::~LLTextureFetchDebugger()
mFetchingHistory.clear();
mStopDebug = TRUE;
tryToStopDebug();
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
}
void LLTextureFetchDebugger::init()
@@ -4225,7 +4208,7 @@ void LLTextureFetchDebugger::init()
if (! mHttpHeaders)
{
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C);
}
}