From 46662a3010b2c920ae60b4ca246d56e3caee6f6f Mon Sep 17 00:00:00 2001
From: Monty Brandenberg <monty@lindenlab.com>
Date: Mon, 18 Jun 2012 11:16:58 -0400
Subject: [PATCH] Move dtors for refcounted objects to protected access.

---
 indra/llcorehttp/_httpopcancel.h      | 4 +++-
 indra/llcorehttp/_httpoperation.h     | 8 +++++++-
 indra/llcorehttp/_httpoprequest.h     | 4 +++-
 indra/llcorehttp/_httpopsetget.h      | 4 +++-
 indra/llcorehttp/_httpopsetpriority.h | 2 ++
 indra/llcorehttp/_httpreplyqueue.h    | 4 +++-
 indra/llcorehttp/_httprequestqueue.h  | 4 +++-
 indra/llcorehttp/bufferarray.h        | 4 +++-
 indra/llcorehttp/httpheaders.h        | 3 ++-
 indra/llcorehttp/httpoptions.h        | 3 ++-
 indra/llcorehttp/httpresponse.h       | 3 ++-
 11 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/indra/llcorehttp/_httpopcancel.h b/indra/llcorehttp/_httpopcancel.h
index 6d1e0f87745..4d927d1aaf0 100644
--- a/indra/llcorehttp/_httpopcancel.h
+++ b/indra/llcorehttp/_httpopcancel.h
@@ -51,8 +51,10 @@ class HttpOpCancel : public HttpOperation
 {
 public:
 	HttpOpCancel(HttpHandle handle);
-	virtual ~HttpOpCancel();
 
+protected:
+	virtual ~HttpOpCancel();							// Use release()
+	
 private:
 	HttpOpCancel(const HttpOpCancel &);					// Not defined
 	void operator=(const HttpOpCancel &);				// Not defined
diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h
index de4939a0aca..5823c08c7be 100644
--- a/indra/llcorehttp/_httpoperation.h
+++ b/indra/llcorehttp/_httpoperation.h
@@ -73,7 +73,9 @@ class HttpOperation : public LLCoreInt::RefCounted
 {
 public:
 	HttpOperation();
-	virtual ~HttpOperation();
+
+protected:
+	virtual ~HttpOperation();							// Use release()
 
 private:
 	HttpOperation(const HttpOperation &);				// Not defined
@@ -131,6 +133,8 @@ class HttpOpStop : public HttpOperation
 {
 public:
 	HttpOpStop();
+
+protected:
 	virtual ~HttpOpStop();
 
 private:
@@ -152,6 +156,8 @@ class HttpOpNull : public HttpOperation
 {
 public:
 	HttpOpNull();
+
+protected:
 	virtual ~HttpOpNull();
 
 private:
diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h
index fc2301057c9..4643cc3b755 100644
--- a/indra/llcorehttp/_httpoprequest.h
+++ b/indra/llcorehttp/_httpoprequest.h
@@ -54,7 +54,9 @@ class HttpOpRequest : public HttpOperation
 {
 public:
 	HttpOpRequest();
-	virtual ~HttpOpRequest();
+
+protected:
+	virtual ~HttpOpRequest();							// Use release()
 
 private:
 	HttpOpRequest(const HttpOpRequest &);				// Not defined
diff --git a/indra/llcorehttp/_httpopsetget.h b/indra/llcorehttp/_httpopsetget.h
index e065eb4c30c..efb24855c5a 100644
--- a/indra/llcorehttp/_httpopsetget.h
+++ b/indra/llcorehttp/_httpopsetget.h
@@ -49,7 +49,9 @@ class HttpOpSetGet : public HttpOperation
 {
 public:
 	HttpOpSetGet();
-	virtual ~HttpOpSetGet();
+
+protected:
+	virtual ~HttpOpSetGet();							// Use release()
 
 private:
 	HttpOpSetGet(const HttpOpSetGet &);					// Not defined
diff --git a/indra/llcorehttp/_httpopsetpriority.h b/indra/llcorehttp/_httpopsetpriority.h
index f1e94b6e431..724293ef784 100644
--- a/indra/llcorehttp/_httpopsetpriority.h
+++ b/indra/llcorehttp/_httpopsetpriority.h
@@ -47,6 +47,8 @@ class HttpOpSetPriority : public HttpOperation
 {
 public:
 	HttpOpSetPriority(HttpHandle handle, HttpRequest::priority_t priority);
+
+protected:
 	virtual ~HttpOpSetPriority();
 
 private:
diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h
index 28cb1d68b79..4220a09a3b0 100644
--- a/indra/llcorehttp/_httpreplyqueue.h
+++ b/indra/llcorehttp/_httpreplyqueue.h
@@ -63,7 +63,9 @@ class HttpReplyQueue : public LLCoreInt::RefCounted
 public:
 	/// Caller acquires a Refcount on construction
 	HttpReplyQueue();
-	virtual ~HttpReplyQueue();
+
+protected:
+	virtual ~HttpReplyQueue();							// Use release()
 
 private:
 	HttpReplyQueue(const HttpReplyQueue &);				// Not defined
diff --git a/indra/llcorehttp/_httprequestqueue.h b/indra/llcorehttp/_httprequestqueue.h
index f96bd7520c7..26d7d9dca67 100644
--- a/indra/llcorehttp/_httprequestqueue.h
+++ b/indra/llcorehttp/_httprequestqueue.h
@@ -51,7 +51,9 @@ class HttpRequestQueue : public LLCoreInt::RefCounted
 protected:
 	/// Caller acquires a Refcount on construction
 	HttpRequestQueue();
-	virtual ~HttpRequestQueue();
+
+protected:
+	virtual ~HttpRequestQueue();						// Use release()
 
 private:
 	HttpRequestQueue(const HttpRequestQueue &);			// Not defined
diff --git a/indra/llcorehttp/bufferarray.h b/indra/llcorehttp/bufferarray.h
index d3862b45e11..d0c51d3c735 100644
--- a/indra/llcorehttp/bufferarray.h
+++ b/indra/llcorehttp/bufferarray.h
@@ -66,7 +66,9 @@ class BufferArray : public LLCoreInt::RefCounted
 {
 public:
 	BufferArray();
-	virtual ~BufferArray();
+
+protected:
+	virtual ~BufferArray();						// Use release()
 
 private:
 	BufferArray(const BufferArray &);			// Not defined
diff --git a/indra/llcorehttp/httpheaders.h b/indra/llcorehttp/httpheaders.h
index 0b6d82561b8..3449daa3a13 100644
--- a/indra/llcorehttp/httpheaders.h
+++ b/indra/llcorehttp/httpheaders.h
@@ -68,9 +68,10 @@ class HttpHeaders : public LLCoreInt::RefCounted
 	/// to the instance.  A call to @see release() will destroy
 	/// the instance.
 	HttpHeaders();
-	~HttpHeaders();
 
 protected:
+	virtual ~HttpHeaders();						// Use release()
+
 	HttpHeaders(const HttpHeaders &);			// Not defined
 	void operator=(const HttpHeaders &);		// Not defined
 
diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h
index 0b9dfdc1de2..78d0aadb2e1 100644
--- a/indra/llcorehttp/httpoptions.h
+++ b/indra/llcorehttp/httpoptions.h
@@ -61,9 +61,10 @@ class HttpOptions : public LLCoreInt::RefCounted
 public:
 	HttpOptions();
 	HttpOptions(const HttpOptions &);
-	virtual ~HttpOptions();
 
 protected:
+	virtual ~HttpOptions();						// Use release()
+	
 	void operator=(const HttpOptions &);		// Not defined
 
 public:
diff --git a/indra/llcorehttp/httpresponse.h b/indra/llcorehttp/httpresponse.h
index 5cf3a919f41..5bcd7c4eb80 100644
--- a/indra/llcorehttp/httpresponse.h
+++ b/indra/llcorehttp/httpresponse.h
@@ -58,9 +58,10 @@ class HttpResponse : public LLCoreInt::RefCounted
 {
 public:
 	HttpResponse();
-	virtual ~HttpResponse();
 
 protected:
+	virtual ~HttpResponse();							// Use release()
+	
 	HttpResponse(const HttpResponse &);					// Not defined
 	void operator=(const HttpResponse &);				// Not defined
 	
-- 
GitLab