]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Remove the unneeded 'deleteSelf' idiom.
authorrobertc <>
Tue, 5 Aug 2003 04:14:37 +0000 (04:14 +0000)
committerrobertc <>
Tue, 5 Aug 2003 04:14:37 +0000 (04:14 +0000)
Keywords:

Remove the unneeded 'deleteSelf' idiom.

145 files changed:
include/List.h
include/RefCount.h
include/splay.h
src/ACL.h
src/ACLARP.cc
src/ACLARP.h
src/ACLASN.h
src/ACLCertificateData.cc
src/ACLCertificateData.h
src/ACLChecklist.cc
src/ACLChecklist.h
src/ACLData.h
src/ACLDestinationDomain.cc
src/ACLDestinationDomain.h
src/ACLDestinationIP.cc
src/ACLDestinationIP.h
src/ACLDomainData.cc
src/ACLDomainData.h
src/ACLExtUser.cc
src/ACLExtUser.h
src/ACLIP.cc
src/ACLIP.h
src/ACLIdent.cc
src/ACLIdent.h
src/ACLIntRange.cc
src/ACLIntRange.h
src/ACLMaxConnection.cc
src/ACLMaxConnection.h
src/ACLMaxUserIP.cc
src/ACLMaxUserIP.h
src/ACLMethodData.cc
src/ACLMethodData.h
src/ACLMyIP.cc
src/ACLMyIP.h
src/ACLProtocolData.cc
src/ACLProtocolData.h
src/ACLProxyAuth.cc
src/ACLProxyAuth.h
src/ACLRegexData.cc
src/ACLRegexData.h
src/ACLSourceIP.cc
src/ACLSourceIP.h
src/ACLStrategised.h
src/ACLStringData.cc
src/ACLStringData.h
src/ACLTimeData.cc
src/ACLTimeData.h
src/ACLUserData.cc
src/ACLUserData.h
src/CommonPool.h
src/CompositePoolNode.h
src/DelayIdComposite.h
src/DelayPool.cc
src/DelayTagged.cc
src/DelayTagged.h
src/DelayUser.cc
src/DelayUser.h
src/DelayVector.cc
src/DelayVector.h
src/ESI.cc
src/ESIAssign.cc
src/ESIAssign.h
src/ESIAttempt.h
src/ESIContext.h
src/ESICustomParser.cc
src/ESICustomParser.h
src/ESIElement.h
src/ESIExcept.h
src/ESIExpatParser.cc
src/ESIExpatParser.h
src/ESIInclude.cc
src/ESIInclude.h
src/ESILiteral.h
src/ESIParser.h
src/ESISegment.cc
src/ESISegment.h
src/ESISequence.cc
src/ESISequence.h
src/ESIVar.h
src/ESIVarState.cc
src/ESIVarState.h
src/ExternalACL.h
src/ExternalACLEntry.cc
src/ExternalACLEntry.h
src/HttpHdrRange.cc
src/HttpHeaderRange.h
src/HttpRequest.cc
src/HttpRequest.h
src/NullDelayId.cc
src/NullDelayId.h
src/StoreIOState.h
src/StoreMeta.cc
src/StoreMeta.h
src/StoreMetaMD5.cc
src/StoreMetaMD5.h
src/StoreMetaSTD.cc
src/StoreMetaSTD.h
src/StoreMetaURL.cc
src/StoreMetaURL.h
src/StoreMetaVary.cc
src/StoreMetaVary.h
src/StoreSwapLogData.cc
src/StoreSwapLogData.h
src/acl.cc
src/asn.cc
src/auth/digest/auth_digest.cc
src/auth/digest/auth_digest.h
src/auth/ntlm/auth_ntlm.cc
src/auth/ntlm/auth_ntlm.h
src/authenticate.cc
src/authenticate.h
src/client_side.cc
src/client_side.h
src/client_side_reply.cc
src/client_side_reply.h
src/client_side_request.cc
src/client_side_request.h
src/comm.cc
src/delay_pools.cc
src/external_acl.cc
src/fs/aufs/store_asyncufs.h
src/fs/aufs/store_io_aufs.cc
src/fs/coss/store_coss.h
src/fs/diskd/store_diskd.h
src/fs/diskd/store_io_diskd.cc
src/fs/ufs/store_dir_ufs.cc
src/fs/ufs/store_io_ufs.cc
src/fs/ufs/store_ufs.h
src/ftp.cc
src/helper.cc
src/helper.h
src/http.cc
src/mem_node.cc
src/mem_node.h
src/peer_digest.cc
src/protos.h
src/stmem.cc
src/store_swapmeta.cc
src/structs.h
src/tunnel.cc
src/ufscommon.cc
src/ufscommon.h
test-suite/http_range_test.cc
test-suite/mem_node_test.cc
test-suite/refcount.cc

index a0884ce3ba996df493da87839dcbebc8b9dcbfd2..d59e6dfec33d52ec1b73494159bb7b54cfc1d8ce 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: List.h,v 1.2 2003/03/04 01:40:22 robertc Exp $
+ * $Id: List.h,v 1.3 2003/08/04 22:14:37 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
 #define SQUID_LIST_H
 
 template <class C>
+
 class List
 {
 
 public:
-  void *operator new (size_t);
-  void operator delete (void *);
-  void deleteSelf() const;
-  List (C const &);
-  ~List();
-
-  bool find(C const &)const;
-  bool findAndTune(C const &);
-  List *next;
-  C element;
+    void *operator new (size_t);
+    void operator delete (void *);
+    List (C const &);
+    ~List();
+
+    bool find(C const &)const;
+    bool findAndTune(C const &);
+    List *next;
+    C element;
+
 private:
-  CBDATA_CLASS(List);
+    CBDATA_CLASS(List);
 #if 0
-  static MemPool *Pool;
+
+    static MemPool *Pool;
 #endif
 };
 
 template<class C>
+
 class ListContainer
 {
-  public:
+
+public:
     ListContainer();
     ~ListContainer();
     List<C> *push_back (C const &);
@@ -73,6 +77,7 @@ class ListContainer
 #if 0
 template <class C>
 MemPool *List<C>::Pool(NULL);
+
 #endif
 template <class C>
 cbdata_type List<C>::CBDATA_List = CBDATA_UNKNOWN;
@@ -84,12 +89,18 @@ List<C>::operator new (size_t byteCount)
 #if 0
     /* derived classes with different sizes must implement their own new */
     assert (byteCount == sizeof (List<C>));
+
     if (!Pool)
-       Pool = memPoolCreate("List", sizeof (List<C>));
+        Pool = memPoolCreate("List", sizeof (List<C>));
+
     return memPoolAlloc(Pool);
+
 #endif
+
     CBDATA_INIT_TYPE(List);
+
     List<C> *result = cbdataAlloc(List);
+
     return result;
 }
 
@@ -102,23 +113,15 @@ List<C>::operator delete (void *address)
     cbdataFree(address);
 }
 
-template <class C>
-void
-List<C>::deleteSelf() const
-{
-    delete this;
-}
-
 template <class C>
 List<C>::List(C const &value) : next(NULL), element (value)
-{
-}
+{}
 
 template <class C>
 List<C>::~List()
 {
     if (next)
-       next->deleteSelf();
+        delete next;
 }
 
 template <class C>
@@ -126,9 +129,11 @@ bool
 List<C>::find (C const &toFind) const
 {
     List<C> const *node = NULL;
+
     for (node = this; node; node = node->next)
-       if (node->element == toFind)
-           return true;
+        if (node->element == toFind)
+            return true;
+
     return false;
 }
 
@@ -137,32 +142,36 @@ bool
 List<C>::findAndTune(C const & toFind)
 {
     List<C> *prev = NULL;
-    for (List<C> *node = this; node; node = node->next) {
-       if (node->element == toFind) {
-           if (prev != NULL) {
-               /* shift the element just found to the second position
-                * in the list */
-               prev->next = node->next;
-               node->next = this->next;
-               this->next = node;
-           }
-           return true;
-       }
-       prev = node;
+
+    for (List<C> *node = this; node; node = node->
+                                            next) {
+        if (node->element == toFind) {
+            if (prev != NULL) {
+                /* shift the element just found to the second position
+                 * in the list */
+                prev->next = node->next;
+                node->next = this->next;
+                this->next = node;
+            }
+
+            return true;
+        }
+
+        prev = node;
     }
+
     return false;
 }
 
 template <class C>
 ListContainer<C>::ListContainer() : head (NULL)
-{
-}
+{}
 
 template <class C>
 ListContainer<C>::~ListContainer()
 {
     if (head)
-       head->deleteSelf();
+        delete head;
 }
 
 template <class C>
@@ -170,34 +179,41 @@ List<C> *
 ListContainer<C>::push_back (C const &element)
 {
     List<C> *node = new List<C> (element);
+
     if (head) {
-       List<C> *tempNode = NULL;
-       for (tempNode = head; tempNode->next; tempNode = tempNode->next);
-       tempNode->next = node;
+        List<C> *tempNode = NULL;
+
+        for (tempNode = head; tempNode->next; tempNode = tempNode->next)
+
+            ;
+        tempNode->next = node;
     } else
-       head = node;
+        head = node;
+
     return node;
 }
 
 template <class C>
-C 
+C
 ListContainer<C>::pop_front()
 {
     if (head) {
-       C result = head->element;
-       List<C> *node = head;
-       head = head->next;
-       node->next = NULL;
-       node->deleteSelf();
-       return result;
+        C result = head->element;
+        List<C> *node = head;
+        head = head->next;
+        node->next = NULL;
+        delete node;
+        return result;
     }
+
     return C();
 }
 
 template <class C>
-bool 
+bool
 ListContainer<C>::empty() const
 {
     return head == NULL;
 }
+
 #endif /* SQUID_LIST_H */
index 9c63b243e4af48049062fb686aa5b796d94c155e..0ad052eb4d44db52226601d775114321204ef0e3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: RefCount.h,v 1.7 2003/07/12 23:44:27 robertc Exp $
+ * $Id: RefCount.h,v 1.8 2003/08/04 22:14:37 robertc Exp $
  *
  * DEBUG: section xx    Refcount allocator
  * AUTHOR:  Robert Collins
@@ -92,13 +92,14 @@ private:
     void dereference(C const *newP = NULL)
     {
         /* Setting p_ first is important:
-        * we may be freed ourselves as a result of
-        * p_->deleteSelf();
-        */
+        * we may be freed ourselves as a result of
+        * delete p_;
+        */
         C const (*tempP_) (p_);
-       p_ = newP;
+        p_ = newP;
+
         if (tempP_ && tempP_->RefCountDereference() == 0)
-            tempP_->deleteSelf();
+            delete tempP_;
     }
 
     void reference (const RefCount& p)
@@ -117,7 +118,6 @@ struct RefCountable_
 
     virtual ~RefCountable_(){}
 
-    virtual void deleteSelf() const = 0;
     /* Not private, to allow class hierarchies */
     void RefCountReference() const
     {
index 433c31b315f32975e26011e43c10659d5d4cbfe2..4159d2416d75e645e0a1aef9cf8d59a45ecde0a3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.h,v 1.21 2003/06/26 12:51:57 robertc Exp $
+ * $Id: splay.h,v 1.22 2003/08/04 22:14:37 robertc Exp $
  */
 
 #ifndef SQUID_SPLAY_H
@@ -42,7 +42,7 @@ public:
     typedef int SPLAYCMP(Value const &a, Value const &b);
     typedef void SPLAYFREE(Value &);
     typedef void SPLAYWALKEE(Value const & nodedata, void *state);
-    static void DefaultFree (Value &aValue) {aValue->deleteSelf();}
+    static void DefaultFree (Value &aValue) {delete aValue;}
 
     Value data;
     mutable SplayNode<V> *left;
index f34d4788875628a814197cb5f7b6f62fdc75f22b..f2cb8ff2e9844e1616a8da4adef76609cced5c8f 100644 (file)
--- a/src/ACL.h
+++ b/src/ACL.h
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACL.h,v 1.9 2003/07/06 21:50:55 hno Exp $
+ * $Id: ACL.h,v 1.10 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -61,7 +61,6 @@ class ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const = 0;
 
     static ACL *Factory (char const *);
     static void ParseAclLine(acl ** head);
@@ -122,7 +121,6 @@ class acl_access
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     bool containsPURGE() const;
     allow_t allow;
     acl_list *aclList;
@@ -139,7 +137,6 @@ class ACLList
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLList();
     void negated(bool isNegated);
index 0f9b1a55f809070ac8ea9dc6dec61a15c6cf949c..86cbd9fd533de05e5c207b30b089b6997294fbdd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLARP.cc,v 1.3 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLARP.cc,v 1.4 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -103,12 +103,6 @@ ACLARP::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLARP::deleteSelf() const
-{
-    delete this;
-}
-
 ACLARP::~ACLARP()
 {
     if (data)
index 642787b3a7c01977a2044e1e778ff56efa79009c..6e6a77420371eebda51735d42485498b56d3df7c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLARP.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLARP.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@
 struct acl_arp_data
 {
     char eth[6];
-    void deleteSelf() const {delete this;}
 };
 
 class ACLARP : public ACL
@@ -51,7 +50,6 @@ class ACLARP : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLARP(char const *);
     ACLARP(ACLARP const &);
index 9eb113cc87fdde0b952c628389a4196076732708..b848ed4c98c54dece38ec41360ec4ab75da3ec03 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLASN.h,v 1.3 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLASN.h,v 1.4 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -50,7 +50,6 @@ class ACLASN : public ACLData<struct in_addr>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     virtual ~ACLASN();
 
index 08405de3940d6898158d6517a41e581602132f0a..c605fe40340a5bef2a5f362672e39a4036a82dfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLCertificateData.cc,v 1.5 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLCertificateData.cc,v 1.6 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -58,13 +58,6 @@ ACLCertificateData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLCertificateData::deleteSelf() const
-{
-    delete this;
-}
-
-
 ACLCertificateData::ACLCertificateData(SSLGETATTRIBUTE *sslStrategy) : attribute (NULL), values (), sslAttributeCall (sslStrategy)
 {}
 
index 484209d8bdc640a1b9bb3c09990bcb69bb7b1cf3..e0e62a1b1b4f50431cf4832c31d71a0db87c4c8e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLCertificateData.h,v 1.4 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLCertificateData.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -47,7 +47,6 @@ class ACLCertificateData : public ACLData<SSL *>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLCertificateData(SSLGETATTRIBUTE *);
     ACLCertificateData(ACLCertificateData const &);
index 546dc46df3f8bc87ca766aa13cb036115c57f505..12ef5fbf3386cdcd27ca48885877cd14eaffddd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLChecklist.cc,v 1.13 2003/07/11 01:40:33 robertc Exp $
+ * $Id: ACLChecklist.cc,v 1.14 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -232,7 +232,7 @@ ACLChecklist::checkCallback(allow_t answer)
     if (cbdataReferenceValidDone(callback_data, &cbdata_))
         callback_(answer, cbdata_);
 
-    deleteSelf();
+    delete this;
 }
 
 void
@@ -285,12 +285,6 @@ ACLChecklist::operator delete (void *address)
     cbdataReferenceDone (t);
 }
 
-void
-ACLChecklist::deleteSelf() const
-{
-    delete this;
-}
-
 ACLChecklist::ACLChecklist() : accessList (NULL), my_port (0), request (NULL),
         reply (NULL),
         auth_user_request (NULL)
index a3edcaba9ced7b49667d510e7bf9235df15a4af6..1c826ce0399d3769cdcaca66967cbec2ad21ca21 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLChecklist.h,v 1.14 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ACLChecklist.h,v 1.15 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -83,7 +83,6 @@ class NullState : public AsyncState
 
     void *operator new(size_t);
     void operator delete(void *);
-    void deleteSelf() const;
 
     ACLChecklist();
     ~ACLChecklist();
index 2a72cca32f4c27f6f9d684dbe6698032bc4e584b..96c58b0ecd39afbe0b5235ba2c2ee250990f8d5c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLData.h,v 1.4 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLData.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@ class ACLData
 {
 
 public:
-    virtual void deleteSelf() const =0;
 
     virtual ~ACLData() {}
 
index 86f094b73b4d221bf52e5478c340b057f0b96088..48be437bd475f9adf022c892c4f4d436fdfa89b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLDestinationDomain.cc,v 1.5 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLDestinationDomain.cc,v 1.6 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -61,15 +61,9 @@ ACLDestinationDomain::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLDestinationDomain::deleteSelf() const
-{
-    delete this;
-}
-
 ACLDestinationDomain::~ACLDestinationDomain()
 {
-    data->deleteSelf();
+    delete data;
 }
 
 ACLDestinationDomain::ACLDestinationDomain(ACLData<char const *> *newData, char const *theType) : data (newData), type_(theType) {}
index fad8151498cf3b5fdcdd42adfbf7c54c1ac7dabe..5676425b59b15b45ef5911a46ef72ce0d95741c4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLDestinationDomain.h,v 1.4 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLDestinationDomain.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -57,7 +57,6 @@ class ACLDestinationDomain : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ~ACLDestinationDomain();
     ACLDestinationDomain(ACLData<char const *> *, char const *);
index 5456f8fe7ea20c356acd2c2fca42468b3bd7c9ee..f497cdf58bb6760af6d9403df440dcc7a0b3e264 100644 (file)
@@ -57,12 +57,6 @@ ACLDestinationIP::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLDestinationIP::deleteSelf() const
-{
-    delete this;
-}
-
 char const *
 ACLDestinationIP::typeString() const
 {
index b103e02f1cf5dd40fb524f7c23f7890919a5b5c8..6ee0dc56bfa10e5ba370f3e21da89b25c92a907a 100644 (file)
@@ -56,7 +56,6 @@ class ACLDestinationIP : public ACLIP
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     virtual char const *typeString() const;
     virtual int match(ACLChecklist *checklist);
index 3e42bfc1f7d0b34f031aec645d67f8568fb48f74..186138a45266ee1c068e3cf2dd7e9a24b55e1f64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLDomainData.cc,v 1.4 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLDomainData.cc,v 1.5 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -58,12 +58,6 @@ ACLDomainData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLDomainData::deleteSelf() const
-{
-    delete this;
-}
-
 template<class T>
 inline void
 xRefFree(T &thing)
index 196ff897062794a6b414625b25b60761489075b9..c90ac8157a15ec0d214ab39afbf37cd668785776 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLDomainData.h,v 1.3 2003/02/21 22:50:04 robertc Exp $
+ * $Id: ACLDomainData.h,v 1.4 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ class ACLDomainData : public ACLData<char const *>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     virtual ~ACLDomainData();
     bool match(char const *);
index b15b6cdd0c23d080f8c6cec5b9968f91e743b153..a38e8ebcaa2a5d2751cba3ccb91e8d29dfcc4161 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLExtUser.cc,v 1.3 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLExtUser.cc,v 1.4 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -62,15 +62,9 @@ ACLExtUser::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLExtUser::deleteSelf() const
-{
-    delete this;
-}
-
 ACLExtUser::~ACLExtUser()
 {
-    data->deleteSelf();
+    delete data;
 }
 
 ACLExtUser::ACLExtUser(ACLData<char const *> *newData, char const *newType) : data (newData), type_ (newType) {}
index ba74c43c0e22bcd9f7174731b5c0234778c26d53..34c9de51f2d0c2bb31b689d1055bc7c3f0740e7a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLExtUser.h,v 1.1 2003/06/27 22:32:31 hno Exp $
+ * $Id: ACLExtUser.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ class ACLExtUser : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLExtUser(ACLData<char const *> *newData, char const *);
     ACLExtUser (ACLExtUser const &old);
index e5b7472e5fb2f9a546f40d03b4948e4df2e3fa76..c2c7a025cdb139400d614d92e169843c7708aa6f 100644 (file)
@@ -418,12 +418,6 @@ acl_ip_data::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-acl_ip_data::deleteSelf() const
-{
-    delete this;
-}
-
 acl_ip_data::acl_ip_data () :addr1(any_addr), addr2(any_addr), mask (any_addr), next (NULL) {}
 
 acl_ip_data::acl_ip_data (struct in_addr const &anAddress1, struct in_addr const &anAddress2, struct in_addr const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext){}
index 28c43172196dedf993a65d5df5a24de3bffb3bb5..83293c331c9feec0623a72a4399bb8c13a37e07a 100644 (file)
@@ -44,7 +44,6 @@ class acl_ip_data
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     static acl_ip_data *FactoryParse(char const *);
     static int NetworkCompare(acl_ip_data * const & a, acl_ip_data * const &b);
 
@@ -72,7 +71,6 @@ class ACLIP : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const = 0;
 
     ACLIP() : data(NULL){}
 
index 787c2ea326ac36a4e1ec6cdaecf842d077d4b78e..44b72a8f7f50ac7df92b198d399bff3db309085c 100644 (file)
@@ -61,15 +61,9 @@ ACLIdent::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLIdent::deleteSelf() const
-{
-    delete this;
-}
-
 ACLIdent::~ACLIdent()
 {
-    data->deleteSelf();
+    delete data;
 }
 
 ACLIdent::ACLIdent(ACLData<char const *> *newData, char const *newType) : data (newData), type_ (newType) {}
index b54260e97766f0366b258d5e8f70ae87255aaa30..e0dfe65b1f4e7f37389c38d92eba8ec2fded4b4d 100644 (file)
@@ -57,7 +57,6 @@ class ACLIdent : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLIdent(ACLData<char const *> *newData, char const *);
     ACLIdent (ACLIdent const &old);
index 2ffa41cffe07aaaed44407445e72a754d006815e..6d1b49018f1c685bfbabff28517b0c2b64ccbbe0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLIntRange.cc,v 1.1 2003/02/25 12:16:55 robertc Exp $
+ * $Id: ACLIntRange.cc,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Robert Collins
@@ -97,12 +97,6 @@ ACLIntRange::match(int i)
     return false;
 }
 
-void
-ACLIntRange::deleteSelf() const
-{
-    delete this;
-}
-
 ACLData<int> *
 ACLIntRange::clone() const
 {
@@ -115,7 +109,7 @@ ACLIntRange::clone() const
 ACLIntRange::~ACLIntRange ()
 {
     if (ranges)
-        ranges->deleteSelf();
+        delete ranges;
 }
 
 wordlist *
index 0488d508362da6addb97606287a81e5396a6851d..391aa374d44e00f4609fdace9006de9e867d5a2d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLIntRange.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLIntRange.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -43,8 +43,6 @@ class ACLIntRange : public ACLData<int>
 {
 
 public:
-    virtual void deleteSelf() const;
-
     ACLIntRange() : ranges(NULL) {}
 
     virtual ~ACLIntRange();
index 496ff39c7676429f57b4a05a5b807fea4c381076..2788c7cf5a116b80246a49163883aa98477c08b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLMaxConnection.cc,v 1.2 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLMaxConnection.cc,v 1.3 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -72,12 +72,6 @@ ACLMaxConnection::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLMaxConnection::deleteSelf() const
-{
-    delete this;
-}
-
 ACLMaxConnection::~ACLMaxConnection()
 {}
 
index 95e5ddca025abe95302487e737d32c57f58d1334..066ab042e47e8b980a266c5efc02f40d25ba30c2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLMaxConnection.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLMaxConnection.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -44,7 +44,6 @@ class ACLMaxConnection : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLMaxConnection(char const *);
     ACLMaxConnection(ACLMaxConnection const &);
index 0e5203db216eac639ee18a141ce2d33127225a5e..dbcdd327e4f63a2cb51c4ac23ebf25842cc91ebe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLMaxUserIP.cc,v 1.3 2003/07/14 08:21:57 robertc Exp $
+ * $Id: ACLMaxUserIP.cc,v 1.4 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -73,12 +73,6 @@ ACLMaxUserIP::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLMaxUserIP::deleteSelf() const
-{
-    delete this;
-}
-
 ACLMaxUserIP::~ACLMaxUserIP()
 {}
 
index bccf81863e0f12fb1e6ff10e3ad2fb9a5ee83248..353f35ebffeb21e8c6476b124c69ca09fdfac03f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLMaxUserIP.h,v 1.2 2003/03/10 11:13:36 robertc Exp $
+ * $Id: ACLMaxUserIP.h,v 1.3 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -44,7 +44,6 @@ class ACLMaxUserIP : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLMaxUserIP(char const *);
     ACLMaxUserIP(ACLMaxUserIP const &);
index 279373bee939df19bb2f09d95b96209a3f90460d..f935dfd954ef150d218e6cacb820f2003c4c3672 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLMethodData.cc,v 1.2 2003/07/14 08:21:57 robertc Exp $
+ * $Id: ACLMethodData.cc,v 1.3 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -57,13 +57,6 @@ ACLMethodData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLMethodData::deleteSelf() const
-{
-    delete this;
-}
-
-
 ACLMethodData::ACLMethodData() : values (NULL)
 {}
 
@@ -75,7 +68,7 @@ ACLMethodData::ACLMethodData(ACLMethodData const &old) : values (NULL)
 ACLMethodData::~ACLMethodData()
 {
     if (values)
-        values->deleteSelf();
+        delete values;
 }
 
 bool
index ea1fe001d9e6604c3e6a30f6fc40f9d686cceb5b..97ec7d9fe81e6603a7d2def74fb24d14434271e5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLMethodData.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLMethodData.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ class ACLMethodData : public ACLData<method_t>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLMethodData();
     ACLMethodData(ACLMethodData const &);
index d0bec2a23a7f9a8aebbcb6f37f22688a0588635b..1306b0e2c6a101a509d2620417d367a29da90689 100644 (file)
@@ -56,12 +56,6 @@ ACLMyIP::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLMyIP::deleteSelf() const
-{
-    delete this;
-}
-
 char const *
 ACLMyIP::typeString() const
 {
index a24fdc2d9e3dbb8c0149e9736aa2bfc2c1ac06e8..dfe289eb059e2c279465ac9ee1f048a48174276a 100644 (file)
@@ -43,7 +43,6 @@ class ACLMyIP : public ACLIP
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     static ACLMyIP const &RegistryEntry();
 
     virtual char const *typeString() const;
index fdde7115b1bc154378b33509c505d283bb60d8fb..424eeabe8f0092c2d83556267fe5c8a9f281b860 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLProtocolData.cc,v 1.2 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLProtocolData.cc,v 1.3 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -57,13 +57,6 @@ ACLProtocolData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLProtocolData::deleteSelf() const
-{
-    delete this;
-}
-
-
 ACLProtocolData::ACLProtocolData() : values (NULL)
 {}
 
@@ -75,7 +68,7 @@ ACLProtocolData::ACLProtocolData(ACLProtocolData const &old) : values (NULL)
 ACLProtocolData::~ACLProtocolData()
 {
     if (values)
-        values->deleteSelf();
+        delete values;
 }
 
 bool
index e708104634a5caa940a321ecf9c96073623b16d3..23db7afee031f170b5c536c4f5bf969f478af462 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLProtocolData.h,v 1.1 2003/02/25 12:22:34 robertc Exp $
+ * $Id: ACLProtocolData.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ class ACLProtocolData : public ACLData<protocol_t>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLProtocolData();
     ACLProtocolData(ACLProtocolData const &);
index 0b3395149ccee62bf1985ac70c9be7f487a613d7..bce5c2fec5561a5f4522be022b5dac0b9649764d 100644 (file)
@@ -62,15 +62,9 @@ ACLProxyAuth::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLProxyAuth::deleteSelf() const
-{
-    delete this;
-}
-
 ACLProxyAuth::~ACLProxyAuth()
 {
-    data->deleteSelf();
+    delete data;
 }
 
 ACLProxyAuth::ACLProxyAuth(ACLData<char const *> *newData, char const *theType) : data (newData), type_(theType) {}
index 12018190333d280a0c2377525d36a0f4591d8db4..53d663d4b6f68a0e871a78fda47bbba59018ebf9 100644 (file)
@@ -68,7 +68,6 @@ class ACLProxyAuth : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ~ACLProxyAuth();
     ACLProxyAuth(ACLData<char const *> *, char const *);
index 64c703c2002832449c9d0ddd4161bb845f8ff99f..b1dedee817923a4f9bd349a0101035c447422e5e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLRegexData.cc,v 1.5 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLRegexData.cc,v 1.6 2003/08/04 22:14:38 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -59,12 +59,6 @@ ACLRegexData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLRegexData::deleteSelf() const
-{
-    delete this;
-}
-
 static void aclDestroyRegexList(relist * data);
 void
 aclDestroyRegexList(relist * data)
index f42007429a0dc5846eedd18c50bcc7c6ef713ad5..ca84ffdd51f7332b59243c228a585efa131ddaa9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLRegexData.h,v 1.3 2003/02/21 22:50:04 robertc Exp $
+ * $Id: ACLRegexData.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -43,7 +43,6 @@ class ACLRegexData : public ACLData<char const *>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     virtual ~ACLRegexData();
     virtual bool match(char const *user);
index 1c9b1867e12ed81d1cf86537a29b7ccc1f62900b..283bd8ba6e4899020078ae007f7c0a15a792adca 100644 (file)
@@ -56,12 +56,6 @@ ACLSourceIP::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLSourceIP::deleteSelf() const
-{
-    delete this;
-}
-
 char const *
 ACLSourceIP::typeString() const
 {
index 06b219d6f445f8ee656c0def1a7cd89d40fdf9ee..9f3690c049170656a28b7aa6e7b1bb8f82a4fea4 100644 (file)
@@ -43,7 +43,6 @@ class ACLSourceIP : public ACLIP
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     virtual char const *typeString() const;
     virtual int match(ACLChecklist *checklist);
index 34538f12c328b209a699f20593e11f015c018621..e208fa5fdeb453d03f86d70a0483945a4132e2a5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLStrategised.h,v 1.4 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLStrategised.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -48,7 +48,6 @@ public:
     typedef M MatchType;
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ~ACLStrategised();
     ACLStrategised(ACLData<MatchType> *, ACLStrategy<MatchType> *, char const *);
@@ -99,17 +98,10 @@ ACLStrategised<MatchType>::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-template <class MatchType>
-void
-ACLStrategised<MatchType>::deleteSelf() const
-{
-    delete this;
-}
-
 template <class MatchType>
 ACLStrategised<MatchType>::~ACLStrategised()
 {
-    data->deleteSelf();
+    delete data;
 }
 
 template <class MatchType>
index 33e01125724f0c8a2b3fcc75abffc2fcf66c45d7..44feee6281f9dc8a0504c923a4efdcd4aa91f769 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLStringData.cc,v 1.2 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLStringData.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -57,13 +57,6 @@ ACLStringData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLStringData::deleteSelf() const
-{
-    delete this;
-}
-
-
 ACLStringData::ACLStringData() : values (NULL)
 {}
 
index 3817a18bacf09f859817b9010d066e1c142558fd..9492e5972c1327675a3008cce612caa68a9d6536 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLStringData.h,v 1.1 2003/02/25 12:22:34 robertc Exp $
+ * $Id: ACLStringData.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ class ACLStringData : public ACLData<char const *>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLStringData();
     ACLStringData(ACLStringData const &);
index c87c2d2c77e26ef2c4500974abbe936c21cf3cab..2cf21f0ecfbac3beb390e3173ff197babe35b2e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLTimeData.cc,v 1.3 2003/07/14 08:21:57 robertc Exp $
+ * $Id: ACLTimeData.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -58,12 +58,6 @@ ACLTimeData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLTimeData::deleteSelf() const
-{
-    delete this;
-}
-
 ACLTimeData::ACLTimeData () : weekbits (0), start (0), stop (0), next (NULL) {}
 
 ACLTimeData::ACLTimeData(ACLTimeData const &old) : weekbits(old.weekbits), start (old.start), stop (old.stop), next (NULL)
@@ -89,7 +83,7 @@ ACLTimeData::operator=(ACLTimeData const &old)
 ACLTimeData::~ACLTimeData()
 {
     if (next)
-        next->deleteSelf();
+        delete next;
 }
 
 bool
@@ -224,7 +218,7 @@ ACLTimeData::parse()
                 debug(28, 0) ("aclParseTimeSpec: IGNORING Bad time range\n");
 
                 if (q != this)
-                    q->deleteSelf();
+                    delete q;
 
                 return;
             }
@@ -238,7 +232,7 @@ ACLTimeData::parse()
                 debug(28, 0) ("aclParseTimeSpec: IGNORING Reversed time range\n");
 
                 if (q != this)
-                    q->deleteSelf();
+                    delete q;
 
                 return;
             }
index 144a90b4f0f1553b26a8a1547c306db271f3618d..2cb883af6bd897deee1eb50512465599ac5a22f3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLTimeData.h,v 1.2 2003/02/21 22:50:04 robertc Exp $
+ * $Id: ACLTimeData.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ class ACLTimeData : public ACLData<time_t>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     ACLTimeData();
     ACLTimeData(ACLTimeData const &);
index 2617d0f0d7716a07ccfba80964e3ee068b83dc29..c380c4966a7bd135b38ce508650c51ee582c1285 100644 (file)
@@ -58,12 +58,6 @@ ACLUserData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLUserData::deleteSelf() const
-{
-    delete this;
-}
-
 template<class T>
 inline void
 xRefFree(T &thing)
index 790caadbcad95aeb96ee7709ed01f024f6e094ce..34cb833ba1a90b1af80bee63087090af1a473809 100644 (file)
@@ -45,7 +45,6 @@ class ACLUserData : public ACLData<char const *>
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     virtual ~ACLUserData();
     bool match(char const *user);
index 6f2acbd96b59d3e87847d8d24fd0d21fb4c239df..8401379a9614b15cee2a89f1c978b378cbc9ac03 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CommonPool.h,v 1.2 2003/02/21 22:50:05 robertc Exp $
+ * $Id: CommonPool.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -57,7 +57,6 @@ class CommonPool
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     static CommonPool *Factory (unsigned char _class, CompositePoolNode::Pointer&);
     char const* theClassTypeLabel() const {return typeLabel.buf();}
 
index d034c73000b77be8146bd27614611cdbf4b07419..95b480c6777d34f7e7b949cddb30ca10a90ec852 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CompositePoolNode.h,v 1.4 2003/05/20 12:17:38 robertc Exp $
+ * $Id: CompositePoolNode.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -59,7 +59,6 @@ public:
     typedef RefCount<CompositePoolNode> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
     virtual ~CompositePoolNode(){}
 
     virtual void stats(StoreEntry * sentry) =0;
index de9c4bf07f2c3ea779840a8290f9f711e5b04f5c..079757494faa80395a58260feca60bdcc5b5056f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayIdComposite.h,v 1.3 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayIdComposite.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -52,7 +52,6 @@ class DelayIdComposite : public RefCountable
 
 public:
     typedef RefCount<DelayIdComposite> Pointer;
-    virtual void deleteSelf() const = 0;
     virtual inline ~DelayIdComposite(){}
 
     virtual int bytesWanted (int min, int max) const =0;
index 116df2a25ca9a1d31cf1a95f886623695e8165f4..5e9b783c68d2dec05bd5c59a80ed49aee3136a80 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayPool.cc,v 1.4 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayPool.cc,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -99,7 +99,7 @@ DelayPool::createPool(u_char delay_class)
 void
 DelayPool::freeData()
 {
-    pool->deleteSelf();
+    delete pool;
     pool = NULL;
 }
 
index 1e735cd78aca3a7754110cf163cccad4a21de1a2..8b3bc8243fec35aa6ec78143ed2fc3ebcc2724cc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayTagged.cc,v 1.3 2003/05/22 11:14:43 robertc Exp $
+ * $Id: DelayTagged.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -58,12 +58,6 @@ DelayTagged::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-DelayTagged::deleteSelf() const
-{
-    delete this;
-}
-
 DelayTagged::DelayTagged()
 {
     DelayPools::registerForUpdates (this);
@@ -175,12 +169,6 @@ DelayTagged::Id::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-DelayTagged::Id::deleteSelf() const
-{
-    delete this;
-}
-
 void *
 DelayTaggedBucket::operator new(size_t size)
 {
index 85fb119cd5fc1c1d7102e39ba6f09ca904f81c7f..2ad149f12af73869f83ee22d30d3cae44106db85 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayTagged.h,v 1.3 2003/08/03 09:03:48 robertc Exp $
+ * $Id: DelayTagged.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -56,7 +56,6 @@ public:
     typedef RefCount<DelayTaggedBucket> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const {delete this;}
 
     void stats(StoreEntry *)const;
     DelayTaggedBucket(String &aTag);
@@ -72,7 +71,6 @@ public:
     typedef RefCount<DelayTagged> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
     DelayTagged();
     virtual ~DelayTagged();
     virtual void stats(StoreEntry * sentry);
@@ -90,7 +88,6 @@ class Id:public DelayIdComposite
     public:
         void *operator new(size_t);
         void operator delete (void *);
-        virtual void deleteSelf() const;
         Id (RefCount<DelayTagged>, String &);
         ~Id();
         virtual int bytesWanted (int min, int max) const;
index 82fd35de76ab87db36c71ad5e101d77f71d75447..c88ebbfbc1b65c255e89dd58f97ba8192558a273 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayUser.cc,v 1.5 2003/05/20 12:17:38 robertc Exp $
+ * $Id: DelayUser.cc,v 1.6 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -58,12 +58,6 @@ DelayUser::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-DelayUser::deleteSelf() const
-{
-    delete this;
-}
-
 DelayUser::DelayUser()
 {
     DelayPools::registerForUpdates (this);
@@ -173,12 +167,6 @@ DelayUser::Id::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-DelayUser::Id::deleteSelf() const
-{
-    delete this;
-}
-
 void *
 DelayUserBucket::operator new(size_t size)
 {
index f3ac3ce46ed3107dadcb4ea1382784e1268f9f54..ac575b14d5fd262d7d0606e1b214571ab3cee90c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayUser.h,v 1.6 2003/08/03 09:03:48 robertc Exp $
+ * $Id: DelayUser.h,v 1.7 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -56,7 +56,6 @@ public:
     typedef RefCount<DelayUserBucket> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const {delete this;}
 
     void stats(StoreEntry *)const;
     DelayUserBucket(AuthUser *);
@@ -72,7 +71,6 @@ public:
     typedef RefCount<DelayUser> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
     DelayUser();
     virtual ~DelayUser();
     virtual void stats(StoreEntry * sentry);
@@ -90,7 +88,6 @@ class Id:public DelayIdComposite
     public:
         void *operator new(size_t);
         void operator delete (void *);
-        virtual void deleteSelf() const;
         Id (RefCount<DelayUser>, AuthUser *);
         ~Id();
         virtual int bytesWanted (int min, int max) const;
index b04cd417c8f0e76c424b2601e8340bb8fb48d7d4..311d256fd73d027f3839fa233cff540eb4822ec1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayVector.cc,v 1.8 2003/05/20 12:17:38 robertc Exp $
+ * $Id: DelayVector.cc,v 1.9 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -58,12 +58,6 @@ DelayVector::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-DelayVector::deleteSelf() const
-{
-    delete this;
-}
-
 DelayVector::DelayVector()
 {
     DelayPools::registerForUpdates (this);
@@ -144,12 +138,6 @@ DelayVector::Id::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-DelayVector::Id::deleteSelf() const
-{
-    delete this;
-}
-
 DelayVector::Id::Id(DelayVector::Pointer aDelayVector, CompositeSelectionDetails &details) : theVector(aDelayVector)
 {
     debug(77,3)("DelayVector::Id::Id\n");
index 42a2eb328c8278b1d48644b509acd2ed3a41a1ba..e6c8394e8cede9e6f5085e638542e45909ed854b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayVector.h,v 1.8 2003/08/03 09:03:48 robertc Exp $
+ * $Id: DelayVector.h,v 1.9 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,6 @@ public:
     typedef RefCount<DelayVector> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
     DelayVector();
     virtual ~DelayVector();
     virtual void stats(StoreEntry * sentry);
@@ -64,7 +63,6 @@ class Id:public DelayIdComposite
     public:
         void *operator new(size_t);
         void operator delete (void *);
-        virtual void deleteSelf() const;
 
         Id (RefCount<DelayVector>,CompositeSelectionDetails &);
         ~Id();
index 8a6006c4c0276e0602e40c951e81c3bee9d6ffad..bf0f52bd9a4c725c7af7cfeb4fa6e5e7921c0595 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESI.cc,v 1.4 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESI.cc,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -99,7 +99,6 @@ struct esiComment : public ESIElement
 {
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf()const;
     ~esiComment();
     esiComment();
     Pointer makeCacheable() const;
@@ -130,7 +129,6 @@ class esiRemove : public ESIElement
 public:
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     esiRemove();
     void render(ESISegment::Pointer);
@@ -151,7 +149,6 @@ struct esiTry : public ESIElement
 {
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     esiTry(esiTreeParentPtr aParent);
     ~esiTry();
@@ -205,7 +202,6 @@ struct esiChoose : public ESIElement
 {
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     esiChoose(esiTreeParentPtr);
     ~esiChoose();
@@ -243,7 +239,6 @@ struct esiWhen : public esiSequence
 {
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
     esiWhen(esiTreeParentPtr aParent, int attributes, const char **attr, ESIVarState *);
     ~esiWhen();
     Pointer makeCacheable() const;
@@ -270,7 +265,6 @@ struct esiOtherwise : public esiSequence
 {
     //    void *operator new (size_t byteCount);
     //    void operator delete (void *address);
-    void deleteSelf() const;
     esiOtherwise(esiTreeParentPtr aParent) : esiSequence (aParent) {}}
 
 ;
@@ -325,12 +319,6 @@ ESIContext::operator delete (void *address)
     cbdataReferenceDone (address);
 }
 
-void
-ESIContext::deleteSelf() const
-{
-    delete this;
-}
-
 void
 ESIContext::setError()
 {
@@ -1463,7 +1451,7 @@ ESIContext::freeResources ()
     ESISegmentFreeList (buffered);
     ESISegmentFreeList (outbound);
     ESISegmentFreeList (outboundtail);
-    varState->deleteSelf();
+    delete varState;
     /* don't touch incoming, it's a pointer into buffered anyway */
 }
 
@@ -1537,12 +1525,6 @@ esiComment::operator delete (void *address)
     memPoolFree (pool, address);
 }
 
-void
-esiComment::deleteSelf() const
-{
-    delete this;
-}
-
 esiComment::esiComment()
 {}
 
@@ -1589,12 +1571,6 @@ esiLiteral::operator delete (void *address)
     memPoolFree (pool, address);
 }
 
-void
-esiLiteral::deleteSelf() const
-{
-    delete this;
-}
-
 esiLiteral::~esiLiteral()
 {
     debug (86, 5) ("esiLiteral::~esiLiteral: %p\n", this);
@@ -1719,12 +1695,6 @@ esiRemove::operator delete (void *address)
     cbdataFree (address);
 }
 
-void
-esiRemove::deleteSelf() const
-{
-    delete this;
-}
-
 ESIElement *
 esiRemoveNew ()
 {
@@ -1794,12 +1764,6 @@ esiTry::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-esiTry::deleteSelf() const
-{
-    delete this;
-}
-
 esiTry::esiTry(esiTreeParentPtr aParent) : parent (aParent) , exceptbuffer(NULL)
 {}
 
@@ -2070,11 +2034,6 @@ esiAttempt::operator delete (void *address)
 }
 
 #endif
-void
-esiAttempt::deleteSelf() const
-{
-    delete this;
-}
 
 /* esiExcept */
 #if 0
@@ -2095,11 +2054,6 @@ esiExcept::operator delete (void *address)
 }
 
 #endif
-void
-esiExcept::deleteSelf() const
-{
-    delete this;
-}
 
 /* ESIVar */
 #if 0
@@ -2121,12 +2075,6 @@ esiVar::operator delete (void *address)
 
 #endif
 
-void
-ESIVar::deleteSelf() const
-{
-    delete this;
-}
-
 /* esiChoose */
 esiChoose::~esiChoose()
 {
@@ -2150,12 +2098,6 @@ esiChoose::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-esiChoose::deleteSelf() const
-{
-    delete this;
-}
-
 esiChoose::esiChoose(esiTreeParentPtr aParent) : elements (), chosenelement (-1),parent (aParent)
 {}
 
@@ -2474,12 +2416,6 @@ esiWhen::operator delete (void *address)
     memPoolFree(Pool, address);
 }
 
-void
-esiWhen::deleteSelf() const
-{
-    delete this;
-}
-
 esiWhen::esiWhen (esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) : esiSequence (aParent)
 {
     varState = NULL;
@@ -2584,12 +2520,6 @@ esiOtherwise::operator delete (void *address)
 
 #endif
 
-void
-esiOtherwise::deleteSelf() const
-{
-    delete this;
-}
-
 /* TODO: implement surrogate targeting and control processing */
 int
 esiEnableProcessing (HttpReply *rep)
index 46a13e86d133ef6dd1a4e0866462df2955eef8e0..3a5fdc81521f95433dffa0078a183c8c50bee351 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIAssign.cc,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIAssign.cc,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -57,12 +57,6 @@ ESIAssign::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ESIAssign::deleteSelf() const
-{
-    delete this;
-}
-
 ESIAssign::~ESIAssign()
 {
     if (value)
index 31b3a5454bf1c4187b7a0aa73d8a7e9adff737a2..fe9b7d45e17d55f0ed5a547e8e6790c9c75c735b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIAssign.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIAssign.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -66,7 +66,6 @@ class ESIAssign : public ESIElement
 public:
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
     ESIAssign (esiTreeParentPtr, int, const char **, ESIContext *);
     ESIAssign (ESIAssign const &);
     ESIAssign &operator=(ESIAssign const &);
index f919bcec1fe6270029c99f475ea8f2d48885469d..2f6aaf26aa31b7746791cb32b15d7e4f44db96e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIAttempt.h,v 1.1 2003/03/10 04:56:35 robertc Exp $
+ * $Id: ESIAttempt.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -46,7 +46,6 @@ struct esiAttempt : public esiSequence
 {
     //    void *operator new (size_t byteCount);
     //    void operator delete (void *address);
-    void deleteSelf() const;
     esiAttempt(esiTreeParentPtr aParent) : esiSequence (aParent) {}}
 
 ;
index 1d687deb264f5a7c9f8103d1a2cf9488595331b5..240ab3af819c5cf12949ca32dd6efe92090b29e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIContext.h,v 1.3 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESIContext.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -52,7 +52,6 @@ public:
     typedef RefCount<ESIContext> Pointer;
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
     ESIContext():reading_(true) {}
 
     ~ESIContext();
index 8f0f2bda037b353fa713561928bb5b33b2808393..0183f260c366d397c5ed8e4a2b044388d62ff775 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESICustomParser.cc,v 1.3 2003/07/15 23:12:02 robertc Exp $
+ * $Id: ESICustomParser.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -61,12 +61,6 @@ ESICustomParser::GetTrie()
     return SearchTrie;
 }
 
-void
-ESICustomParser::deleteSelf() const
-{
-    delete this;
-}
-
 ESICustomParser::ESICustomParser(ESIParserClient *aClient) : theClient (aClient)
 {}
 
index 32899c7475505127ee4119d6cdb82372ee3a5ef7..30af6c298d621359acb494433303715f279b26f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESICustomParser.h,v 1.3 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESICustomParser.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -41,7 +41,6 @@ class ESICustomParser : public ESIParser
 {
 
 public:
-    virtual void deleteSelf() const;
     ESICustomParser(ESIParserClient *);
     ~ESICustomParser();
     /* true on success */
index 1cbc1c376ac8d7233bae59fe1921058682444540..47cd226270de554827d98c6317f5bbc776dc5169 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIElement.h,v 1.3 2003/07/14 20:29:28 robertc Exp $
+ * $Id: ESIElement.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -100,8 +100,6 @@ public:
         return ESI_PROCESS_COMPLETE;
     }
 
-    virtual void deleteSelf() const = 0;
-
     virtual bool mayFail() const
     {
         return true;
index b96d3e11c532d3fb472dbb0dc4292881247f9437..f923425028fc80620754858f065f10ce51f5fd53 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIExcept.h,v 1.2 2003/07/15 23:12:02 robertc Exp $
+ * $Id: ESIExcept.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -48,7 +48,6 @@ class esiExcept : public esiSequence
 public:
     //    void *operator new (size_t byteCount);
     //    void operator delete (void *address);
-    void deleteSelf() const;
     esiExcept(esiTreeParentPtr aParent) : esiSequence (aParent) {}}
 
 ;
index 7f4bec6e285ec84f07ce554ab408a21cb350f747..b9cb7953d82fcb29dd253fe7741b138924fbe06a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIExpatParser.cc,v 1.1 2003/03/10 04:56:35 robertc Exp $
+ * $Id: ESIExpatParser.cc,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
 #include "squid.h"
 #include "ESIExpatParser.h"
 
-void
-ESIExpatParser::deleteSelf() const
-{
-    delete this;
-}
-
 ESIExpatParser::ESIExpatParser(ESIParserClient *aClient) : theClient (aClient)
 {
     /* TODO: grab the document encoding from the headers */
index 08545acaf33dd2c1946b8cb03bd944ac3f4dd990..67c091bc56c1d77de9c1bea4350c9ed3881d7ebe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIExpatParser.h,v 1.1 2003/03/10 04:56:35 robertc Exp $
+ * $Id: ESIExpatParser.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -40,7 +40,6 @@ class ESIExpatParser : public ESIParser
 {
 
 public:
-    virtual void deleteSelf() const;
     ESIExpatParser(ESIParserClient *);
     ~ESIExpatParser();
     /* true on success */
index e92af5a6d7702b1713f9912e4dd97ea90d10be3f..6ee9b89bb76d676d0f4d6a78b383dfa7ce604ac4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIInclude.cc,v 1.2 2003/07/23 10:41:20 robertc Exp $
+ * $Id: ESIInclude.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -251,12 +251,6 @@ ESIStreamContext::operator delete (void *address)
     cbdataReferenceDone (address);
 }
 
-void
-ESIStreamContext::deleteSelf() const
-{
-    delete this;
-}
-
 ESIStreamContext *
 ESIStreamContextNew (ESIIncludePtr include)
 {
@@ -301,12 +295,6 @@ ESIInclude::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ESIInclude::deleteSelf() const
-{
-    delete this;
-}
-
 ESIElement::Pointer
 ESIInclude::makeCacheable() const
 {
index 3c1f1453be59049c9b83525e9ce35c91c78b208b..621a337d966f3733ecd4e921401c91c2262bc1b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIInclude.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIInclude.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -51,7 +51,6 @@ public:
     typedef RefCount<ESIStreamContext> Pointer;
     void *operator new(size_t);
     void operator delete(void *);
-    void deleteSelf() const;
     ESIStreamContext();
     ~ESIStreamContext();
     void freeResources();
@@ -72,7 +71,6 @@ class ESIInclude : public ESIElement
 public:
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
     ~ESIInclude();
index 7c4c0ac79d6ad27b05d669cd4f4369e00a50916c..9a4ba939b666f2d05b37e3454c57142c27b72d63 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESILiteral.h,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESILiteral.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -46,7 +46,6 @@ struct esiLiteral : public ESIElement
 {
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     esiLiteral(ESISegment::Pointer);
     esiLiteral(ESIContext *, const char *s, int len);
index ec182c7385c0564bf559a1b30e3d3388aab0c760..e965f0e86901f4567fc0ee932980ba69448f3d19 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIParser.h,v 1.1 2003/03/10 04:56:36 robertc Exp $
+ * $Id: ESIParser.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -50,7 +50,6 @@ public:
     typedef RefCount<ESIParser> Pointer;
     static Pointer NewParser(ESIParserClient *aClient);
     static char *Type;
-    virtual void deleteSelf() const =0;
     /* true on success */
     virtual bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) = 0;
     virtual size_t lineNumber() const =0;
index 8d75c3e2895c8957d3c9cc06089d61c3e0c605f2..c9eb54f1b01e1c9a3ca0899a5263eb763f2a9396 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESISegment.cc,v 1.2 2003/03/11 08:24:42 robertc Exp $
+ * $Id: ESISegment.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -166,12 +166,6 @@ ESISegment::operator delete (void *address)
     cbdataFree (address);
 }
 
-void
-ESISegment::deleteSelf() const
-{
-    delete this;
-}
-
 /* XXX: if needed, make this iterative */
 ESISegment::Pointer
 ESISegment::cloneList () const
index ff4a18bc384599c3ef7c65be3fdfb3347f5ee697..44da5717e2200b2faf32e485a50ea1651b5d7d5a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESISegment.h,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESISegment.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -49,7 +49,6 @@ public:
     static void ListTransfer (Pointer &from, Pointer &to);
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     ESISegment();
     ESISegment(ESISegment const &);
index 63441338075890e6d7c5276200a575fa44e9d081..bfda742099141990ee1b64ada94290bcb3d7b9e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESISequence.cc,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESISequence.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -43,12 +43,6 @@ class esiExcept;
 
 MemPool *esiSequence::Pool = NULL;
 
-void
-esiSequence::deleteSelf() const
-{
-    delete this;
-}
-
 esiSequence::~esiSequence ()
 {
     debug (86,5)("esiSequence::~esiSequence %p\n", this);
index 81bf9bd45e5e90a3e21d5282afdbadd5cf47e34e..58a27785c0a61b21e69a25a352f819455f8e013f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESISequence.h,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESISequence.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -48,7 +48,6 @@ class esiSequence : public ESIElement
 public:
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     esiSequence(esiTreeParentPtr, bool = false);
     ~esiSequence();
index d28a7057843aec69224fae49757450a0d818b118..95434b85dd9487fa55dd4046991c4ad4dc7e8e1f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIVar.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIVar.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -48,7 +48,6 @@ class ESIVar:public esiSequence
 public:
     //    void *operator new (size_t byteCount);
     //    void operator delete (void *address);
-    void deleteSelf() const;
     ESIVar(esiTreeParentPtr aParent) : esiSequence (aParent)
     {
         flags.dovars = 1;
index 8bebc1041660be123207ce98062cb8eaaa90689d..ca6cf6205c6319e4d4369db5e738cc9b3302e86b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIVarState.cc,v 1.2 2003/07/23 10:41:20 robertc Exp $
+ * $Id: ESIVarState.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -202,12 +202,6 @@ ESIVarState::operator delete (void *address)
     cbdataFree (address);
 }
 
-void
-ESIVarState::deleteSelf() const
-{
-    delete this;
-}
-
 char *
 ESIVariableUserAgent::getProductVersion (char const *s)
 {
index 36929ee48ad6259a4bbe114163b68151a3a7451f..b1106de8f0bbe7aee2753101f897f7c5bc3b3a2f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIVarState.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIVarState.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -68,7 +68,6 @@ public:
 
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
     void freeResources();
     ESIVarState (HttpHeader const *hdr, char const *uri);
     ~ESIVarState();
index bb35bed64b32ada20606e2c2725596b9a1cfccc6..174ec5b0b4c2e6da5db563ef62e4ab21b64e9c3f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ExternalACL.h,v 1.4 2003/05/20 12:17:38 robertc Exp $
+ * $Id: ExternalACL.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -60,7 +60,6 @@ class ACLExternal : public ACL
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
 
     static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *, EAH * callback, void *callback_data);
 
index 51812dc6850ebbc656da5e4d48ee1516e3c87526..88ffbe6b6b33f086bdb0a415f87d0b91e7ab4258 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ExternalACLEntry.cc,v 1.4 2003/07/09 14:14:57 hno Exp $
+ * $Id: ExternalACLEntry.cc,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 82    External ACL
  * AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -65,12 +65,6 @@ ExternalACLEntry::operator delete (void *address)
     cbdataFree (address);
 }
 
-void
-ExternalACLEntry::deleteSelf() const
-{
-    delete this;
-}
-
 ExternalACLEntry::ExternalACLEntry()
 {
     lru.next = lru.prev = NULL;
index 8d10eab29410d1db8e8fb4c4e3adf9cd248b7ae9..3e2ce8099ffa499ea4c31251ccaba4c2c1aba8da 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ExternalACLEntry.h,v 1.4 2003/07/09 14:14:57 hno Exp $
+ * $Id: ExternalACLEntry.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 82    External ACL
  * AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -77,7 +77,6 @@ class ExternalACLEntry: public hash_link
 public:
     void *operator new (size_t bytesToAllocate);
     void operator delete (void *address);
-    void deleteSelf() const;
 
     ExternalACLEntry();
     ~ExternalACLEntry();
index aedc9e09c56f0ecf0be96085c04bfb11ec76d11d..1d0fe8fbd72bbca5e0adf4d903651a120409948c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrRange.cc,v 1.36 2003/07/14 14:15:56 robertc Exp $
+ * $Id: HttpHdrRange.cc,v 1.37 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -88,12 +88,6 @@ HttpHdrRangeSpec::operator delete (void *spec)
     memPoolFree(Pool, spec);
 }
 
-void
-HttpHdrRangeSpec::deleteSelf() const
-{
-    delete this;
-}
-
 HttpHdrRangeSpec::HttpHdrRangeSpec() : offset(UnknownPosition), length(UnknownPosition){}
 
 /* parses range-spec and returns new object on success */
@@ -270,12 +264,6 @@ HttpHdrRange::operator delete (void *address)
     memPoolFree(Pool, address);
 }
 
-void
-HttpHdrRange::deleteSelf() const
-{
-    delete this;
-}
-
 HttpHdrRange::HttpHdrRange () : clen (HttpHdrRangeSpec::UnknownPosition)
 {}
 
@@ -285,7 +273,7 @@ HttpHdrRange::ParseCreate(const String * range_spec)
     HttpHdrRange *r = new HttpHdrRange;
 
     if (!r->parseInit(range_spec)) {
-        r->deleteSelf();
+        delete r;
         r = NULL;
     }
 
@@ -332,7 +320,7 @@ HttpHdrRange::parseInit(const String * range_spec)
 HttpHdrRange::~HttpHdrRange()
 {
     while (specs.size())
-        specs.pop_back()->deleteSelf();
+        delete specs.pop_back();
 }
 
 HttpHdrRange::HttpHdrRange(HttpHdrRange const &old) : specs()
@@ -398,7 +386,7 @@ HttpHdrRange::merge (Vector<HttpHdrRangeSpec *> &basis)
     while (i != basis.end()) {
         if (specs.size() && (*i)->mergeWith(specs.back())) {
             /* merged with current so get rid of the prev one */
-            specs.pop_back()->deleteSelf();
+            delete specs.pop_back();
             continue;  /* re-iterate */
         }
 
@@ -420,7 +408,7 @@ HttpHdrRange::getCanonizedSpecs (Vector<HttpHdrRangeSpec *> &copy)
         if ((*pos)->canonize(clen))
             copy.push_back (*pos);
         else
-            (*pos)->deleteSelf();
+            delete (*pos);
     }
 
     debug(64, 3) ("HttpHdrRange::getCanonizedSpecs: found %d bad specs\n",
index ad63601cb35f50a664bbbd6908d036f371413267..8a184fa1d3dadfc8630047f5f23a43fafce2bab6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeaderRange.h,v 1.4 2003/07/14 23:53:40 robertc Exp $
+ * $Id: HttpHeaderRange.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -46,7 +46,6 @@ class HttpHdrRangeSpec
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     typedef Range<ssize_t> HttpRange;
     static ssize_t const UnknownPosition;
 
@@ -76,7 +75,6 @@ class HttpHdrRange
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
 
     static size_t ParsedCount;
     /* Http Range Header Field */
index 248b56f03b5a016b631bd12e384705b238441bf2..591536b40fa29914c2129318f970f38831d6dfc3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.cc,v 1.41 2003/07/15 11:33:21 robertc Exp $
+ * $Id: HttpRequest.cc,v 1.42 2003/08/04 22:14:40 robertc Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -60,12 +60,6 @@ HttpRequest::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-HttpRequest::deleteSelf() const
-{
-    delete this;
-}
-
 HttpRequest::HttpRequest()  : header(hoRequest)
 {
     /* We should initialise these ... */
@@ -151,7 +145,7 @@ requestDestroy(request_t * req)
         httpHdrCcDestroy(req->cache_control);
 
     if (req->range)
-        req->range->deleteSelf();
+        delete req->range;
 
     req->tag.clean();
 
@@ -161,7 +155,7 @@ requestDestroy(request_t * req)
 
     req->extacl_log.clean();
 
-    req->deleteSelf();
+    delete req;
 }
 
 request_t *
index c3ff7e118384c913f42c516abeddbc0879850404..20d79bc250b2b4b87ef2db5919e3e85271635d51 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.h,v 1.5 2003/07/15 11:33:21 robertc Exp $
+ * $Id: HttpRequest.h,v 1.6 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -58,7 +58,6 @@ class HttpRequest
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     HttpRequest();
     virtual ~HttpRequest() {}
 
index 9b37f89685e5b12ab8e984aec36d36d61046ad6c..e333bf3e54e4de096e008ca56257d821681a9ae5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: NullDelayId.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: NullDelayId.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -58,11 +58,5 @@ NullDelayId::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-NullDelayId::deleteSelf() const
-{
-    delete this;
-}
-
 #endif
 
index f8782c0291c73b6c50c93e74d914412789cbaf86..7287826788fdccb3802e5d65a058c6bcbf62d4bb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: NullDelayId.h,v 1.3 2003/03/10 11:13:36 robertc Exp $
+ * $Id: NullDelayId.h,v 1.4 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -52,7 +52,6 @@ class NullDelayId : public DelayIdComposite
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
     virtual int bytesWanted (int minimum, int maximum) const {return max(minimum,maximum);}
 
     virtual void bytesIn(int qty) {}}
index 7e08d09ba96ca0083ae96cda81da78489e91f4e1..410e1a0c7cfa345bc998dfd48ebc415971b6ca37 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreIOState.h,v 1.5 2003/07/22 15:23:01 robertc Exp $
+ * $Id: StoreIOState.h,v 1.6 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -44,7 +44,6 @@ public:
     /* storeIOState does not get mempooled - it's children do */
     void *operator new (size_t amount);
     void operator delete (void *address);
-    virtual void deleteSelf() const = 0;
     virtual ~storeIOState();
 
     storeIOState();
index 152d9aafc713877a6f01b2f782524107f0f29dbe..5cdb0cd9a15a5168fd4bd7faa4177ad56d3a4bbf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMeta.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMeta.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -137,7 +137,7 @@ StoreMeta::Factory (char type, size_t len, void const *value)
     }
 
     if (!result->validLength(len)) {
-        result->deleteSelf();
+        delete result;
         return NULL;
     }
 
@@ -155,7 +155,7 @@ StoreMeta::FreeList(StoreMeta **head)
     while ((node = *head) != NULL) {
         *head = node->next;
         xfree(node->value);
-        node->deleteSelf();
+        delete node;
     }
 }
 
@@ -190,9 +190,3 @@ StoreMeta::checkConsistency(StoreEntry *e) const
 
     return true;
 }
-
-void
-StoreMeta::deleteSelf()
-{
-    delete this;
-}
index 6bb256314ff9b71383110d5e7c78d51413bd7e94..f8a86af6e7be67bceffc15f7198774e875f1acb2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMeta.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMeta.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@ class StoreMeta
 {
 
 public:
-    virtual void deleteSelf() = 0;
     static bool validType(char);
     static int const MaximumTLVLength;
     static int const MinimumTLVLength;
index 9108b3ec753c8af01b22588ea2ee310b38947e1d..f16ceff45ec0579508640ed27858a581aebf49d7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaMD5.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaMD5.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -58,12 +58,6 @@ StoreMetaMD5::operator delete (void *address)
     memPoolFree(pool, address);
 }
 
-void
-StoreMetaMD5::deleteSelf()
-{
-    delete this;
-}
-
 bool
 StoreMetaMD5::validLength(int len) const
 {
index ee789f025e519ed730218affe6982d1015dcfed6..56a1f5e6952d2660fc0380f4a68703c76eb7ff02 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaMD5.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaMD5.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@ class StoreMetaMD5 : public StoreMeta
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf();
 
     char getType() const {return STORE_META_KEY_MD5;}
 
index ec4dc9bb2c3585f3904d78ffd304025ad01ecb3b..83363db6ade942bb18fb9e06f78d49913c93af15 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaSTD.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaSTD.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -58,12 +58,6 @@ StoreMetaSTD::operator delete (void *address)
     memPoolFree(pool, address);
 }
 
-void
-StoreMetaSTD::deleteSelf()
-{
-    delete this;
-}
-
 bool
 StoreMetaSTD::validLength(int len) const
 {
index 24357d7a2f74088270e06c0168ede9eb596bc356..a67c5ea6e66961ee6b82b64dfe213d65bf70619b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaSTD.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaSTD.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@ class StoreMetaSTD : public StoreMeta
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf();
 
     char getType() const {return STORE_META_STD;}
 
index 150f9831566ec99f1f541795c716787e5a4ee1ad..4cc7ee7eb18a4fc81f405333b6fef7e30d9671b7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaURL.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaURL.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -58,12 +58,6 @@ StoreMetaURL::operator delete (void *address)
     memPoolFree(pool, address);
 }
 
-void
-StoreMetaURL::deleteSelf()
-{
-    delete this;
-}
-
 bool
 StoreMetaURL::checkConsistency(StoreEntry *e) const
 {
index 6c2efbbfb6794d1749dbe798413f9af9701a5547..bb476e6b6058744507c65ce63fe0e6482d81eba4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaURL.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaURL.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@ class StoreMetaURL : public StoreMeta
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf();
 
     char getType() const {return STORE_META_URL;}
 
index 8743a4ed7d664d750e6b7a6813511b6bf377263b..2a7a1cb07ceabd6d0b25e99d98e61fa0961ed1ca 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaVary.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaVary.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -58,12 +58,6 @@ StoreMetaVary::operator delete (void *address)
     memPoolFree(pool, address);
 }
 
-void
-StoreMetaVary::deleteSelf()
-{
-    delete this;
-}
-
 bool
 StoreMetaVary::checkConsistency(StoreEntry *e) const
 {
index 269a04238d7fb04206d10e5f2aa02a543d9ea835..0b1d80576bc914a3cd480ac64c7d400c03af9cc5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaVary.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaVary.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -42,7 +42,6 @@ class StoreMetaVary : public StoreMeta
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf();
 
     char getType() const {return STORE_META_VARY_HEADERS;}
 
index e0a8f6a4557e76d473a30624f31deb98fab20d42..f8bfc55491cac26424f26bc5b67fabf2c78659c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: StoreSwapLogData.cc,v 1.1 2003/07/15 11:33:21 robertc Exp $
+ * $Id: StoreSwapLogData.cc,v 1.2 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -58,9 +58,3 @@ StoreSwapLogData::operator delete (void *address)
 {
     memPoolFree (Pool, address);
 }
-
-void
-StoreSwapLogData::deleteSelf() const
-{
-    delete this;
-}
index 338cd7078419e54bdc2b2e1800eb0d2744599eeb..3681fa442be62433eafe380c4375764e9f9bc7c7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreSwapLogData.h,v 1.1 2003/07/15 11:33:21 robertc Exp $
+ * $Id: StoreSwapLogData.h,v 1.2 2003/08/04 22:14:41 robertc Exp $
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -51,7 +51,6 @@ class StoreSwapLogData
 public:
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
     StoreSwapLogData();
     char op;
     sfileno swap_filen;
index bc04dfcf0e6de7616884aabac459e369d7bae9d9..40d7fe393fa0e571bae95e5b28527338e2978123 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.309 2003/07/16 05:27:17 robertc Exp $
+ * $Id: acl.cc,v 1.310 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -149,7 +149,7 @@ ACL::ParseAclLine(acl ** head)
     if (!A->valid()) {
         debug(28, 0) ("aclParseAclLine: IGNORING invalid ACL: %s\n",
                       A->cfgline);
-        A->deleteSelf();
+        delete A;
         /* Do we need this? */
         A = NULL;
         return;
@@ -359,7 +359,7 @@ aclParseAclList(acl_list ** head)
             debug(28, 0) ("%s line %d: %s\n",
                           cfg_filename, config_lineno, config_input_line);
             debug(28, 0) ("aclParseAccessLine: ACL name '%s' not found.\n", t);
-            L->deleteSelf();
+            delete L;
             continue;
         }
 
@@ -559,7 +559,7 @@ aclDestroyAcls(acl ** head)
 
     for (acl *a = *head; a; a = next) {
         next = a->next;
-        a->deleteSelf();
+        delete a;
     }
 
     *head = NULL;
@@ -578,7 +578,7 @@ aclDestroyAclList(acl_list ** head)
 
     for (l = *head; l; l = *head) {
         *head = l->next;
-        l->deleteSelf();
+        delete l;
     }
 }
 
@@ -687,12 +687,6 @@ ACLList::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLList::deleteSelf() const
-{
-    delete this;
-}
-
 CBDATA_CLASS_INIT(acl_access);
 
 void *
@@ -710,12 +704,6 @@ acl_access::operator delete (void *address)
     cbdataFree(t);
 }
 
-void
-acl_access::deleteSelf () const
-{
-    delete this;
-}
-
 ACL::Prototype::Prototype() : prototype (NULL), typeString (NULL) {}
 
 ACL::Prototype::Prototype (ACL const *aPrototype, char const *aType) : prototype (aPrototype), typeString (aType)
index 4df85f6c811daf22d0e8824e8d367f93a82434a1..a9a3c648e7262160e0e0b5e596c8a7ab2d75f34a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: asn.cc,v 1.95 2003/07/14 14:15:58 robertc Exp $
+ * $Id: asn.cc,v 1.96 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -497,10 +497,10 @@ destroyRadixNodeInfo(as_info * e_info)
     while (data) {
         prev = data;
         data = data->next;
-        prev->deleteSelf();
+        delete prev;
     }
 
-    data->deleteSelf();
+    delete data;
 }
 
 static int
@@ -567,16 +567,10 @@ ACLASN::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLASN::deleteSelf() const
-{
-    delete this;
-}
-
 ACLASN::~ACLASN()
 {
     if (data)
-        data->deleteSelf();
+        delete data;
 }
 
 bool
index 6b58848b9591c889ef4161064d46fbc8dd846047..8deaa1547223c7344a80ef4fdb4bb80a6a385f77 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: auth_digest.cc,v 1.27 2003/07/14 14:16:21 robertc Exp $
+ * $Id: auth_digest.cc,v 1.28 2003/08/04 22:14:48 robertc Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Robert Collins
@@ -1529,12 +1529,6 @@ digest_user_h::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-digest_user_h::deleteSelf() const
-{
-    delete this;
-}
-
 digest_user_h::digest_user_h () : username (NULL), HA1created (0)
 {}
 
@@ -1557,12 +1551,6 @@ digest_request_h::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-digest_request_h::deleteSelf() const
-{
-    delete this;
-}
-
 digest_request_h::digest_request_h () : theUser (NULL)
         , credentials_ok (Unchecked)
 {}
index 37c35936f05f6b64591a2ee43ced39219d51f2db..bb97c24b5dc12a5838ecf2bb63e22fa290951cb6 100644 (file)
@@ -28,7 +28,6 @@ class digest_user_h
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
 
     digest_user_h();
     ~digest_user_h();
@@ -53,7 +52,6 @@ public:
     enum CredentialsState {Unchecked, Ok, Pending, Failed};
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
 
     digest_request_h();
     digest_request_h(auth_user_t *);
index c4d1ac1c5d573cdcd37d2c9e45be69e839cff47e..de59eb232c335a1848b6cee108fd8aa625e1f54b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: auth_ntlm.cc,v 1.35 2003/08/03 08:09:30 robertc Exp $
+ * $Id: auth_ntlm.cc,v 1.36 2003/08/04 22:14:53 robertc Exp $
  *
  * DEBUG: section 29    NTLM Authenticator
  * AUTHOR: Robert Collins
@@ -1254,9 +1254,3 @@ ntlm_request_t::operator delete (void *address)
 {
     memPoolFree (Pool, address);
 }
-
-void
-ntlm_request_t::deleteSelf() const
-{
-    delete this;
-}
index 94fd2382d5226b0167f976dc11968096e795c8b0..a0a1b4eb558eb63f71cb3d7810118ab639620240 100644 (file)
@@ -42,7 +42,6 @@ class ntlm_request_t : public AuthUserRequestState
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
 
     ~ntlm_request_t();
     virtual int authenticated() const;
index 010119703b1f24a2a141b663bc899539443c7195..53c2fea52b847024c63bf0e2272a3869a9a80396 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.cc,v 1.61 2003/07/29 11:34:56 robertc Exp $
+ * $Id: authenticate.cc,v 1.62 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR:  Robert Collins
@@ -294,7 +294,7 @@ AuthUserRequest::~AuthUserRequest()
             if (authscheme_list[auth_user->auth_module - 1].requestFree != NULL)
                 authscheme_list[auth_user->auth_module - 1].requestFree(this);
             else {
-                state()->deleteSelf();
+                delete state();
                 state(NULL);
             }
         }
index 3ebfa60b5f139364d0f2d18e70a31ce16000822c..ad84cffd03ddc6918a479d21cd05f9edd402c5c4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.h,v 1.11 2003/07/14 14:15:59 robertc Exp $
+ * $Id: authenticate.h,v 1.12 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -118,7 +118,6 @@ class AuthUserRequestState
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const = 0;
     virtual ~AuthUserRequestState(){}
 
     virtual int authenticated() const = 0;
index 23f2b8369ef6c533854d3727aef1c00397dbae6d..1818d703331f0ce3d1bbbe9f4c77ccf6f9da7980 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.651 2003/07/15 06:50:41 robertc Exp $
+ * $Id: client_side.cc,v 1.652 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -112,12 +112,6 @@ ClientSocketContext::operator delete (void *address)
     cbdataFree (address);
 }
 
-void
-ClientSocketContext::deleteSelf() const
-{
-    delete this;
-}
-
 /* Local functions */
 /* ClientSocketContext */
 static ClientSocketContext *ClientSocketContextNew(clientHttpRequest *);
@@ -1088,7 +1082,7 @@ ClientSocketContext::buildRangeHeader(HttpReply * rep)
     if (range_err) {
         /* XXX Why do we do this here, and not when parsing the request ? */
         debug(33, 3) ("clientBuildRangeHeader: will not do ranges: %s.\n", range_err);
-        http->request->range->deleteSelf();
+        delete http->request->range;
         http->request->range = NULL;
     } else {
         /* XXX: TODO: Review, this unconditional set may be wrong. - TODO: review. */
@@ -3071,12 +3065,6 @@ ConnStateData::operator delete (void *address)
     cbdataFree(t);
 }
 
-void
-ConnStateData::deleteSelf () const
-{
-    delete this;
-}
-
 ConnStateData::ConnStateData() : transparent_ (false), reading_ (false), openReference (this)
 {}
 
index b15751a1087e7dd3cdf797e398f9639216280d49..a502e441446f443b2b2147120da46826efcce915 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.h,v 1.5 2003/07/12 12:39:56 robertc Exp $
+ * $Id: client_side.h,v 1.6 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -50,7 +50,6 @@ public:
     typedef RefCount<ClientSocketContext> Pointer;
     void *operator new(size_t);
     void operator delete(void *);
-    void deleteSelf() const;
     ClientSocketContext();
     ~ClientSocketContext();
     bool startOfOutput() const;
@@ -127,7 +126,6 @@ public:
     typedef RefCount<ConnStateData> Pointer;
     void * operator new (size_t);
     void operator delete (void *);
-    void deleteSelf() const;
 
     ConnStateData();
     ~ConnStateData();
index 344a090a85ebe8e1345f1586260869a91c23a5dc..a0db4328701dd5e1b08e3ac80c02e879bbc5e496 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.cc,v 1.62 2003/07/23 11:21:37 robertc Exp $
+ * $Id: client_side_reply.cc,v 1.63 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 88    Client-side Reply Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -155,12 +155,6 @@ clientReplyContext::operator delete (void *address)
     cbdataFree (tmp);
 }
 
-void
-clientReplyContext::deleteSelf() const
-{
-    delete this;
-}
-
 void
 clientReplyContext::saveState()
 {
index 5c8a5237b38d5723f4247e62c4f2650e876a7ffd..f6e4b32708490cb29d718a7a4cd5d558a02c60de 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.h,v 1.4 2003/06/20 01:01:00 robertc Exp $
+ * $Id: client_side_reply.h,v 1.5 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -49,7 +49,6 @@ class clientReplyContext : public RefCountable, public StoreClient
 public:
     void *operator new (size_t byteCount);
     void operator delete (void *address);
-    void deleteSelf() const;
     static STCB CacheHit;
     static STCB HandleIMSReply;
     static STCB SendMoreData;
index 5763cd3c7b7c1ef7e6f9e416bf72509171672ac6..506a55dbffd264add793a2f623b6ae7172d06fbf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_request.cc,v 1.29 2003/08/03 08:09:26 robertc Exp $
+ * $Id: client_side_request.cc,v 1.30 2003/08/04 22:14:41 robertc Exp $
  * 
  * DEBUG: section 85    Client-side Request Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -66,7 +66,6 @@ class ClientRequestContext : public RefCountable
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    void deleteSelf() const;
 
     ClientRequestContext();
     ClientRequestContext(ClientHttpRequest *);
@@ -107,12 +106,6 @@ ClientRequestContext::operator delete (void *address)
     cbdataReferenceDone (t);
 }
 
-void
-ClientRequestContext::deleteSelf() const
-{
-    delete this;
-}
-
 /* Local functions */
 /* other */
 static void clientAccessCheckDone(int, void *);
@@ -131,7 +124,7 @@ ClientRequestContext::~ClientRequestContext()
         cbdataReferenceDone(http);
 
     if (acl_checklist)
-        acl_checklist->deleteSelf();
+        delete acl_checklist;
 }
 
 ClientRequestContext::ClientRequestContext() : acl_checklist (NULL), redirect_state (REDIRECT_NONE), http(NULL)
@@ -165,12 +158,6 @@ ClientHttpRequest::operator delete (void *address)
     cbdataReferenceDone (temp);
 }
 
-void
-ClientHttpRequest::deleteSelf() const
-{
-    delete this;
-}
-
 ClientHttpRequest::ClientHttpRequest()
 {
     /* reset range iterator */
@@ -384,7 +371,7 @@ clientAccessCheckDone(int answer, void *data)
     clientHttpRequest *http_ = context->http;
 
     if (!cbdataReferenceValid (http_)) {
-        context->deleteSelf();
+        delete context;
         return;
     }
 
@@ -409,7 +396,7 @@ clientAccessCheckDone(int answer, void *data)
     } else {
         /* Send an error */
         clientStreamNode *node = (clientStreamNode *)http->client_stream.tail->prev->data;
-        context->deleteSelf();
+        delete context;
         debug(85, 5) ("Access Denied: %s\n", http->uri);
         debug(85, 5) ("AclMatchedName = %s\n",
                       AclMatchedName ? AclMatchedName : "<null>");
@@ -719,7 +706,7 @@ clientRedirectDone(void *data, char *result)
     clientHttpRequest *http_ = context->http;
 
     if (!cbdataReferenceValid (http_)) {
-        context->deleteSelf();
+        delete context;
         return;
     }
 
@@ -826,11 +813,11 @@ ClientRequestContext::checkNoCacheDone(int answer)
     clientHttpRequest *http_ = http;
 
     if (!cbdataReferenceValid (http_)) {
-        deleteSelf();
+        delete this;
         return;
     }
 
-    deleteSelf();
+    delete this;
     http_->request->flags.cachable = answer;
     http_->processRequest();
 }
index fa6dccf6ff4a4c447b909bbfeb5d630ce5e9b74b..8f8dde0ca443eec7e3c745c018d892141ab9a3bc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_request.h,v 1.15 2003/07/14 14:16:00 robertc Exp $
+ * $Id: client_side_request.h,v 1.16 2003/08/04 22:14:41 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -53,7 +53,6 @@ class ClientHttpRequest
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf() const;
 
     ClientHttpRequest();
     ~ClientHttpRequest();
index 453f0bfcbc20d512035203b16c6c13ac78016c0b..eb3ec33bc30a13a28c96668b92d7b7bde978adf5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.385 2003/08/03 09:21:29 robertc Exp $
+ * $Id: comm.cc,v 1.386 2003/08/04 22:14:41 robertc Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -55,7 +55,6 @@ class ConnectStateData
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     static void Connect (int fd, void *me);
     void connect();
     void callCallback(comm_err_t status, int xerrno);
@@ -213,7 +212,6 @@ class CommCallbackData
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     CommCallbackData(CommCommonCallback const &);
     virtual ~CommCallbackData() {}
 
@@ -244,7 +242,6 @@ class CommReadCallbackData : public CommCallbackData
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     CommReadCallbackData(CommCommonCallback const &, CallBack<IOCB> aCallback, int);
     virtual comm_callback_t getType() const { return COMM_CB_READ; }
 
@@ -262,7 +259,6 @@ class CommAcceptCallbackData : public CommCallbackData
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     CommAcceptCallbackData(int const anFd, CallBack<IOACB>, comm_err_t, int, int, ConnectionDetail const &);
     virtual void callCallback();
 
@@ -279,7 +275,6 @@ class CommFillCallbackData : public CommCallbackData
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     CommFillCallbackData(int const anFd, CallBack<IOFCB> aCallback, comm_err_t, int);
     virtual void callCallback();
 
@@ -294,7 +289,6 @@ class CommWriteCallbackData : public CommCallbackData
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     CommWriteCallbackData(int const anFd, CallBack<IOWCB> aCallback, comm_err_t, int, int);
     virtual void callCallback();
 
@@ -340,12 +334,6 @@ CommCallbackData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-CommCallbackData::deleteSelf() const
-{
-    delete this;
-}
-
 MemPool (*CommReadCallbackData::Pool)(NULL);
 void *
 CommReadCallbackData::operator new (size_t byteCount)
@@ -365,12 +353,6 @@ CommReadCallbackData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-CommReadCallbackData::deleteSelf() const
-{
-    delete this;
-}
-
 MemPool (*CommAcceptCallbackData::Pool)(NULL);
 void *
 CommAcceptCallbackData::operator new (size_t byteCount)
@@ -390,12 +372,6 @@ CommAcceptCallbackData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-CommAcceptCallbackData::deleteSelf() const
-{
-    delete this;
-}
-
 MemPool (*CommFillCallbackData::Pool)(NULL);
 void *
 CommFillCallbackData::operator new (size_t byteCount)
@@ -415,13 +391,6 @@ CommFillCallbackData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-CommFillCallbackData::deleteSelf() const
-{
-    delete this;
-}
-
-
 MemPool (*CommWriteCallbackData::Pool)(NULL);
 void *
 CommWriteCallbackData::operator new (size_t byteCount)
@@ -441,12 +410,6 @@ CommWriteCallbackData::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-CommWriteCallbackData::deleteSelf() const
-{
-    delete this;
-}
-
 CommCallbackData::CommCallbackData(CommCommonCallback const &newResults) : result (newResults)
 {
     assert(fdc_table[result.fd].active == 1);
@@ -595,7 +558,7 @@ comm_calliocallback(void)
         dlink_node *node = (dlink_node *)CommCallbackList.head;
         cio = (CommCallbackData *)node->data;
         cio->callACallback();
-        cio->deleteSelf();
+        delete cio;
     }
 
     PROF_stop(comm_calliocallback);
@@ -1283,12 +1246,6 @@ ConnectStateData::operator delete (void *address)
     cbdataFree(address);
 }
 
-void
-ConnectStateData::deleteSelf() const
-{
-    delete this;
-}
-
 void
 commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data)
 {
@@ -1356,7 +1313,7 @@ commConnectFree(int fd, void *data)
     debug(5, 3) ("commConnectFree: FD %d\n", fd);
     cbdataReferenceDone(cs->callback.data);
     safe_free(cs->host);
-    cs->deleteSelf();
+    delete cs;
 }
 
 static void
@@ -1864,7 +1821,7 @@ _comm_close(int fd, char const *file, int line)
         /* We're closing! */
         cio->fdClosing();
         cio->callACallback();
-        cio->deleteSelf();
+        delete cio;
     }
 
     commCallCloseHandlers(fd);
index 5e64625a7542014bcbd015c858be5f519a562fb8..2d32f656b1b148747af52e55d56fa678625b611a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: delay_pools.cc,v 1.41 2003/08/03 09:03:49 robertc Exp $
+ * $Id: delay_pools.cc,v 1.42 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -69,7 +69,6 @@ public:
     typedef RefCount<Aggregate> Pointer;
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
     Aggregate();
     ~Aggregate();
     virtual DelaySpec *rate() {return &spec;}
@@ -91,7 +90,6 @@ class AggregateId:public DelayIdComposite
     public:
         void *operator new(size_t);
         void operator delete (void *);
-        virtual void deleteSelf() const;
         AggregateId (RefCount<Aggregate>);
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
@@ -161,7 +159,6 @@ class Id:public DelayIdComposite
     public:
         void *operator new(size_t);
         void operator delete (void *);
-        virtual void deleteSelf() const;
         Id (RefCount<VectorPool>, int);
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
@@ -178,7 +175,6 @@ class IndividualPool : public VectorPool
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
 
 protected:
     virtual char const *label() const {return "Individual";}
@@ -193,7 +189,6 @@ class ClassCNetPool : public VectorPool
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    virtual void deleteSelf() const;
 
 protected:
     virtual char const *label() const {return "Network";}
@@ -258,7 +253,6 @@ class Id:public DelayIdComposite
     public:
         void *operator new(size_t);
         void operator delete (void *);
-        virtual void deleteSelf() const;
         Id (RefCount<ClassCHostPool>, unsigned char, unsigned char);
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
@@ -290,12 +284,6 @@ CommonPool::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-CommonPool::deleteSelf() const
-{
-    delete this;
-}
-
 CommonPool *
 CommonPool::Factory(unsigned char _class, CompositePoolNode::Pointer& compositeCopy)
 {
@@ -441,12 +429,6 @@ CompositePoolNode::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-CompositePoolNode::deleteSelf() const
-{
-    delete this;
-}
-
 void *
 Aggregate::operator new(size_t size)
 {
@@ -461,12 +443,6 @@ Aggregate::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-Aggregate::deleteSelf() const
-{
-    delete this;
-}
-
 Aggregate::Aggregate()
 {
     theBucket.init (*rate());
@@ -536,12 +512,6 @@ Aggregate::AggregateId::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-Aggregate::AggregateId::deleteSelf() const
-{
-    delete this;
-}
-
 Aggregate::AggregateId::AggregateId(RefCount<Aggregate> anAggregate) : theAggregate(anAggregate)
 {}
 
@@ -732,12 +702,6 @@ IndividualPool::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-IndividualPool::deleteSelf() const
-{
-    delete this;
-}
-
 VectorPool::VectorPool()
 {
     DelayPools::registerForUpdates (this);
@@ -855,12 +819,6 @@ VectorPool::Id::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-VectorPool::Id::deleteSelf() const
-{
-    delete this;
-}
-
 VectorPool::Id::Id (VectorPool::Pointer aPool, int anIndex) : theVector (aPool), theIndex (anIndex)
 {}
 
@@ -900,12 +858,6 @@ ClassCNetPool::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-ClassCNetPool::deleteSelf() const
-{
-    delete this;
-}
-
 unsigned int const
 
 ClassCNetPool::makeKey (struct in_addr &src_addr) const
@@ -1033,12 +985,6 @@ ClassCHostPool::Id::operator delete (void *address)
     ::operator delete (address);
 }
 
-void
-ClassCHostPool::Id::deleteSelf() const
-{
-    delete this;
-}
-
 ClassCHostPool::Id::Id (ClassCHostPool::Pointer aPool, unsigned char aNet, unsigned char aHost) : theClassCHost (aPool), theNet (aNet), theHost (aHost)
 {}
 
index 84d4cb09928f9a628058f0c1235a034ed7d594c2..aa2dab360a6a0c99ce0c6f07789a927fb8d4b0d3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: external_acl.cc,v 1.51 2003/07/14 08:21:56 robertc Exp $
+ * $Id: external_acl.cc,v 1.52 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 82    External ACL
  * AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -882,7 +882,7 @@ external_acl_cache_delete(external_acl * def, external_acl_entry * entry)
     hash_remove_link(def->cache, entry);
     dlinkDelete(&entry->lru, &def->lru_list);
     def->cache_entries -= 1;
-    entry->deleteSelf();
+    delete entry;
 }
 
 /******************************************************************
@@ -1250,12 +1250,6 @@ ACLExternal::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-ACLExternal::deleteSelf() const
-{
-    delete this;
-}
-
 char const *
 ACLExternal::typeString() const
 {
index 2c498763a8efac7894c7b30b9b961ef48b66779b..9e7284e7dbf355a4d7169fa90752e2eb6473e439 100644 (file)
@@ -89,7 +89,6 @@ class AUFSFile : public DiskFile
 {
 
 public:
-    virtual void deleteSelf() const;
     void * operator new (size_t);
     void operator delete (void *);
     AUFSFile (char const *path, AufsIO *);
@@ -165,7 +164,6 @@ public:
     AufsIO();
     virtual bool shedLoad();
     virtual int load();
-    virtual void deleteSelf() const;
     virtual StoreIOState::Pointer createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const;
     virtual DiskFile::Pointer newFile(char const *path);
     virtual void unlinkFile (char const *);
index ed826e479f2e4c863bf0124494015f2e82a541fc..c0acdfe62bf09e138a88d49bbe7e90152d1b4b50 100644 (file)
@@ -50,12 +50,6 @@ AufsIO::load()
     return loadav;
 }
 
-void
-AufsIO::deleteSelf() const
-{
-    /* do nothing, we use a single instance */
-}
-
 StoreIOState::Pointer
 AufsIO::createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const
 {
@@ -130,9 +124,6 @@ AUFSFile::operator delete (void *address)
     cbdataReferenceDone (t);
 }
 
-void
-AUFSFile::deleteSelf() const {delete this;}
-
 AUFSFile::AUFSFile (char const *aPath, AufsIO *anIO):fd(-1), errorOccured (false), IO(anIO),
         inProgressIOs (0)
 {
index e8c4ea0c947f1b58dbe5f283b7c20d258febab10..0c0970a293ee5b0a77e82e2a429ef164061091cf 100644 (file)
@@ -63,8 +63,6 @@ class CossState : public storeIOState
 {
 
 public:
-    virtual void deleteSelf() const {delete this;}
-
     void * operator new (size_t);
     void operator delete (void *);
     CossState(CossSwapDir *);
index 166d258c990fb646c3f267571b9c1e345614d7f3..d2522493ef975637b6594d1a133dd4cb7ed58a1a 100644 (file)
@@ -25,7 +25,6 @@ class DiskdFile : public DiskFile
 {
 
 public:
-    virtual void deleteSelf() const;
     void * operator new (size_t);
     void operator delete (void *);
     DiskdFile (char const *path, DiskdIO *);
@@ -139,7 +138,6 @@ class DiskdIO : public UFSStrategy
 public:
     DiskdIO();
     virtual bool shedLoad();
-    virtual void deleteSelf() const;
     virtual void openFailed();
     virtual int load();
     virtual StoreIOState::Pointer createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const;
index dc1327eae5fb9f3b033417889ac38faad7c1bd82..2ab018eaf7f13660c268143fa6560a1874afe278 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_diskd.cc,v 1.35 2003/07/29 11:34:57 robertc Exp $
+ * $Id: store_io_diskd.cc,v 1.36 2003/08/04 22:14:53 robertc Exp $
  *
  * DEBUG: section 79    Squid-side DISKD I/O functions.
  * AUTHOR: Duane Wessels
@@ -83,12 +83,6 @@ DiskdIO::load()
     return away * 1000 / magic2;
 }
 
-void
-DiskdIO::deleteSelf() const
-{
-    /* do nothing, we use a single instance */
-}
-
 void
 DiskdIO::openFailed()
 {
@@ -256,9 +250,6 @@ DiskdFile::operator delete (void *address)
     cbdataReferenceDone (t);
 }
 
-void
-DiskdFile::deleteSelf() const {delete this;}
-
 DiskdFile::DiskdFile (char const *aPath, DiskdIO *anIO) : errorOccured (false), IO(anIO),
         inProgressIOs (0)
 {
index 387cb4a87edb3d80273ddfb332f0d1d018f8bc9f..4e109ed281d8786fd5b2f5777558320d66e856e2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.61 2003/08/03 10:05:20 robertc Exp $
+ * $Id: store_dir_ufs.cc,v 1.62 2003/08/04 22:14:53 robertc Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -196,7 +196,7 @@ UFSSwapDir::~UFSSwapDir()
     filemapFreeMemory(map);
 
     if (IO)
-        IO->deleteSelf();
+        delete IO;
 
     IO = NULL;
 }
index cc3f38e3bfd3b257876c114787c899d4e1ce93db..b7bd27016e87486b80f409d8cf260c3c731a7ffe 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_ufs.cc,v 1.21 2003/07/28 09:27:29 robertc Exp $
+ * $Id: store_io_ufs.cc,v 1.22 2003/08/04 22:14:53 robertc Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -54,12 +54,6 @@ UfsIO::load()
     return 999;
 }
 
-void
-UfsIO::deleteSelf() const
-{
-    /* Do nothing, we use a single instance */
-}
-
 StoreIOState::Pointer
 UfsIO::createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const
 {
@@ -122,9 +116,6 @@ UFSFile::operator delete (void *address)
     cbdataReferenceDone (t);
 }
 
-void
-UFSFile::deleteSelf() const {delete this;}
-
 UFSFile::UFSFile (char const *aPath) : fd (-1), closed (true), error_(false)
 {
     assert (aPath);
index afe7b490f53bdd9c27de3c12b32b2ba7c82c3f56..e60643e69d71695af22c8c6c29686ec1e9badcbd 100644 (file)
@@ -15,7 +15,6 @@ class UFSFile : public DiskFile
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    virtual void deleteSelf() const;
     UFSFile (char const *path);
     ~UFSFile();
     virtual void open (int, mode_t, IORequestor::Pointer);
@@ -56,7 +55,6 @@ class UfsIO : public UFSStrategy
 public:
     virtual bool shedLoad();
     virtual int load();
-    virtual void deleteSelf() const;
     virtual StoreIOState::Pointer createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const;
     virtual DiskFile::Pointer newFile (char const *path);
     virtual void unlinkFile (char const *);
index fd5f8ac15a41a78ebe0f508448bbd2778ccf331a..f2ffeb9825b9e6b373fa13e640b9e61857b75b35 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.350 2003/06/20 01:01:00 robertc Exp $
+ * $Id: ftp.cc,v 1.351 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -136,7 +136,6 @@ class FtpStateData
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     ~FtpStateData();
     StoreEntry *entry;
     request_t *request;
@@ -215,12 +214,6 @@ FtpStateData::operator delete (void *address)
     cbdataFree(t);
 }
 
-void
-FtpStateData::deleteSelf () const
-{
-    delete this;
-}
-
 typedef struct
 {
     char type;
@@ -359,7 +352,7 @@ static void
 ftpStateFree(int fdnotused, void *data)
 {
     FtpStateData *ftpState = (FtpStateData *)data;
-    ftpState->deleteSelf();
+    delete ftpState;
 }
 
 FtpStateData::~FtpStateData()
index 24e7d849aaf68b7ec5acfb6c7b987651cc47e430..599c34bbc1090a1a0322cf6cedd1eca0266df8b5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: helper.cc,v 1.59 2003/07/15 11:33:22 robertc Exp $
+ * $Id: helper.cc,v 1.60 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 84    Helper process maintenance
  * AUTHOR: Harvest Derived?
@@ -1452,7 +1452,7 @@ helperRequestFree(helper_request * r)
 {
     cbdataReferenceDone(r->data);
     xfree(r->buf);
-    r->deleteSelf();
+    delete r;
 }
 
 MemPool (*helper_request::Pool)(NULL);
@@ -1475,18 +1475,12 @@ helper_request::operator delete (void *address)
     memPoolFree (Pool, address);
 }
 
-void
-helper_request::deleteSelf() const
-{
-    delete this;
-}
-
 static void
 helperStatefulRequestFree(helper_stateful_request * r)
 {
     cbdataReferenceDone(r->data);
     xfree(r->buf);
-    r->deleteSelf();
+    delete r;
 }
 
 MemPool (*helper_stateful_request::Pool)(NULL);
@@ -1508,9 +1502,3 @@ helper_stateful_request::operator delete (void *address)
 {
     memPoolFree (Pool, address);
 }
-
-void
-helper_stateful_request::deleteSelf() const
-{
-    delete this;
-}
index dc107978d4d5d3812f0ba55461389ebda6fd73ff..639ca1f22087180987784973ec501908193c9855 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: helper.h,v 1.1 2003/07/15 11:33:21 robertc Exp $
+ * $Id: helper.h,v 1.2 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 84    Helper process maintenance
  * AUTHOR: Harvest Derived?
@@ -44,7 +44,6 @@ class helper_request
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     char *buf;
     HLPCB *callback;
     void *data;
@@ -61,7 +60,6 @@ class helper_stateful_request
 public:
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     char *buf;
     HLPSCB *callback;
     int placeholder;           /* if 1, this is a dummy request waiting for a stateful helper to become available for deferred requests.*/
index f67ba92f8134c6b0994dbaa82bc18a5b1778ab89..aff8ca7b159a26236359cd81d92a05ba88742563 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.424 2003/07/29 11:34:56 robertc Exp $
+ * $Id: http.cc,v 1.425 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -1145,7 +1145,7 @@ httpBuildRequestHeader(request_t * request,
         /* don't cache the result */
         orig_request->flags.cachable = 0;
         /* pretend it's not a range request */
-        orig_request->range->deleteSelf();
+        delete orig_request->range;
         orig_request->range = NULL;
         orig_request->flags.range = 0;
     }
index 88cea9203f5673fb727effd314c820f9ad06b905..c9d61d960d0f2a6618a71e77c8dc546e0a766b88 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem_node.cc,v 1.4 2003/06/26 12:51:57 robertc Exp $
+ * $Id: mem_node.cc,v 1.5 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Robert Collins
@@ -57,12 +57,6 @@ mem_node::operator delete (void *address)
     memPoolFree(pool, address);
 }
 
-void
-mem_node::deleteSelf() const
-{
-    delete this;
-}
-
 mem_node::mem_node(off_t offset):nodeBuffer(0,offset,data)
 {}
 
index bd47f181e290c8f097be17080d76ac48e0f108dc..016c63d976d8bdcd2221b583dfdf432c1fd161e8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem_node.h,v 1.4 2003/06/26 12:51:57 robertc Exp $
+ * $Id: mem_node.h,v 1.5 2003/08/04 22:14:42 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -46,7 +46,6 @@ public:
 
     void operator delete (void *);
     void *operator new (size_t);
-    void deleteSelf() const;
     mem_node(off_t);
     ~mem_node();
     size_t space() const;
index 319c44b783a95d58e188ad2c415a43abef66aa51..6fa69c5f2f6c3d0091f40d61bc86702dfd990589 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.cc,v 1.97 2003/07/16 20:22:26 wessels Exp $
+ * $Id: peer_digest.cc,v 1.98 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -122,12 +122,6 @@ PeerDigest::operator delete (void *address)
     cbdataFree(t);
 }
 
-void
-PeerDigest::deleteSelf () const
-{
-    delete this;
-}
-
 /* allocate new peer digest, call Init, and lock everything */
 PeerDigest *
 peerDigestCreate(peer * p)
@@ -156,7 +150,7 @@ peerDigestDestroy(PeerDigest * pd)
 
     peerDigestClean(pd);
 
-    pd->deleteSelf();
+    delete pd;
 }
 
 /* called by peer to indicate that somebody actually needs this digest */
index b7a2a5e3c48b85d296338b5e5480d0e7672ae625..ebfe540abfb08163cfddc40dc0005ab9a4f116cf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.486 2003/07/28 09:27:28 robertc Exp $
+ * $Id: protos.h,v 1.487 2003/08/04 22:14:42 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -210,7 +210,7 @@ void
 FreeObject(void *address)
 {
     O *anObject = static_cast <O *>(address);
-    anObject->deleteSelf();
+    delete anObject;
 }
 
 SQUIDCEXTERN void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
index f44d6f6f8a5570e4561e675b0912de56a3c41b31..5a0713fe68d050a271cfdec886f141ae30bae0a1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stmem.cc,v 1.79 2003/06/26 12:51:57 robertc Exp $
+ * $Id: stmem.cc,v 1.80 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Harvest Derived
@@ -75,7 +75,7 @@ void
 mem_hdr::unlink(mem_node *aNode)
 {
     nodes.remove (aNode, NodeCompare);
-    aNode->deleteSelf();
+    delete aNode;
 }
 
 int
index c0a8bc7cae4a71e2d132e9eb411ff181dea7d7d9..fbacf6f9d9dd6cb0fe4b1517424a583c95c4deb0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapmeta.cc,v 1.21 2003/02/21 22:50:12 robertc Exp $
+ * $Id: store_swapmeta.cc,v 1.22 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -47,7 +47,7 @@ storeSwapTLVFree(tlv * n)
     while ((t = n) != NULL) {
         n = t->next;
         xfree(t->value);
-        t->deleteSelf();
+        delete t;
     }
 }
 
index ed6ab210b8d177a17681a30504036669b8a682f6..0a82b849dc45bf512582cdc9d5109419ed694a69 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.476 2003/07/22 15:23:02 robertc Exp $
+ * $Id: structs.h,v 1.477 2003/08/04 22:14:42 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -1146,7 +1146,6 @@ class PeerDigest
 public:
     void *operator new (size_t);
     void operator delete(void *);
-    void deleteSelf() const;
 
     struct _peer *peer;                        /* pointer back to peer structure, argh */
     CacheDigest *cd;           /* actual digest structure */
index 9a2485d808a8b5b7fef4a1a83f9f59add9fa8f1a..95578356ac134396d2adfa623a1e10f6ae9712fc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tunnel.cc,v 1.143 2003/07/15 06:50:43 robertc Exp $
+ * $Id: tunnel.cc,v 1.144 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -52,7 +52,6 @@ public:
     class Connection;
     void *operator new(size_t);
     void operator delete (void *);
-    void deleteSelf() const;
     static void ReadClient(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data);
     static void ReadServer(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data);
     static void WriteClientDone(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data);
@@ -159,7 +158,7 @@ sslStateFree(SslStateData * sslState)
     sslState->host = NULL;
     requestUnlink(sslState->request);
     sslState->request = NULL;
-    sslState->deleteSelf();
+    delete sslState;
 }
 
 SslStateData::Connection::~Connection()
@@ -736,12 +735,6 @@ SslStateData::operator delete (void *address)
     cbdataFree(t);
 }
 
-void
-SslStateData::deleteSelf () const
-{
-    delete this;
-}
-
 void
 SslStateData::Connection::fd(int const newFD)
 {
index ebd8deee1c7bc05e80cc4f1e8e8f2a5110c1d909..7010005ec35e4614b729b82861d5728940673db5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ufscommon.cc,v 1.10 2003/07/15 11:33:22 robertc Exp $
+ * $Id: ufscommon.cc,v 1.11 2003/08/04 22:14:42 robertc Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Robert Collins
@@ -65,12 +65,6 @@ RebuildState::operator delete (void *address)
     cbdataReferenceDone (t);
 }
 
-void
-RebuildState::deleteSelf() const
-{
-    delete this;
-}
-
 RebuildState::~RebuildState()
 {
     store_dirs_rebuilding--;
@@ -136,7 +130,7 @@ RebuildState::rebuildFromDirectory()
         if (fd == -2) {
             debug(47, 1) ("Done scanning %s swaplog (%d entries)\n",
                           sd->path, n_read);
-            deleteSelf();
+            delete this;
             return;
         } else if (fd < 0) {
             continue;
index df450195100432eec6630fc0899df654a05a8de1..4edf10b85b313773f3fc2e83dbadbe746a7c9cf9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ufscommon.h,v 1.7 2003/07/22 15:23:03 robertc Exp $
+ * $Id: ufscommon.h,v 1.8 2003/08/04 22:14:42 robertc Exp $
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -151,7 +151,6 @@ class DiskFile : public RefCountable
 
 public:
     typedef RefCount<DiskFile> Pointer;
-    virtual void deleteSelf() const = 0;
     virtual void open (int, mode_t, IORequestor::Pointer) = 0;
     virtual void create (int, mode_t, IORequestor::Pointer) = 0;
     virtual void read(char *, off_t, size_t) = 0;
@@ -176,7 +175,6 @@ class UFSStrategy
 
 public:
     virtual bool shedLoad() = 0;
-    virtual void deleteSelf() const = 0;
     virtual void openFailed(){}
 
     virtual int load(){return -1;}
@@ -259,9 +257,6 @@ public:
 
     operator C *() {return const_cast<C *>(theInstance);}
 
-    // This will go when we remove the deleteSelf idiom
-    virtual void deleteSelf() const {delete const_cast<InstanceToSingletonAdapter*>(this);}
-
 private:
     C const *theInstance;
 };
@@ -272,8 +267,6 @@ class UFSStoreState : public storeIOState, public IORequestor
 {
 
 public:
-    virtual void deleteSelf() const {delete this;}
-
     void * operator new (size_t);
     void operator delete (void *);
     UFSStoreState(SwapDir * SD, StoreEntry * anEntry, STIOCB * callback_, void *callback_data_);
@@ -354,7 +347,6 @@ class RebuildState : public RefCountable
 public:
     void *operator new(size_t);
     void operator delete(void *);
-    void deleteSelf() const;
     static EVH RebuildFromDirectory;
     static EVH RebuildFromSwapLog;
 
index ce8bfa2b3710b175b7fd330fb7dad7cb45c28562..114dd5d748b379351950238f298d92feba9c0059 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http_range_test.cc,v 1.8 2003/08/03 22:06:10 robertc Exp $
+ * $Id: http_range_test.cc,v 1.9 2003/08/04 22:14:56 robertc Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -171,7 +171,7 @@ testRangeParser(char const *rangestring)
 
     assert (*pos);
 
-    range->deleteSelf();
+    delete range;
 }
 
 HttpHdrRange *
@@ -221,7 +221,7 @@ testRangeCanonization()
 
     assert (range->specs.count == 3);
 
-    range->deleteSelf();
+    delete range;
 
     range=rangeFromString("bytes=0-3, 1-, -2");
 
@@ -231,7 +231,7 @@ testRangeCanonization()
     if (!range->canonize(4))
         exit(1);
 
-    range->deleteSelf();
+    delete range;
 
     range=rangeFromString("bytes=3-6");
 
@@ -241,7 +241,7 @@ testRangeCanonization()
     if (range->canonize(3))
         exit(1);
 
-    range->deleteSelf();
+    delete range;
 
     range=rangeFromString("bytes=3-6");
 
@@ -251,7 +251,7 @@ testRangeCanonization()
     if (!range->canonize(4))
         exit(1);
 
-    range->deleteSelf();
+    delete range;
 
     range=rangeFromString("bytes=1-1,2-3");
 
@@ -262,7 +262,7 @@ testRangeCanonization()
 
     assert (range->specs.count == 2);
 
-    range->deleteSelf();
+    delete range;
 }
 
 int
index e3fe8db6c19bc5a28b115d83edc5c2365ae15c1e..92a5880a5d493d0811e8cf1d17358e88a69f0012 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem_node_test.cc,v 1.4 2003/06/26 12:52:00 robertc Exp $
+ * $Id: mem_node_test.cc,v 1.5 2003/08/04 22:14:57 robertc Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Robert Collins
@@ -79,7 +79,7 @@ main (int argc, char *argv)
     assert (mem_node (0) < mem_node (2));
     assert (!(mem_node (0) < mem_node (0)));
     assert (!(mem_node (2) < mem_node (0)));
-    aNode->deleteSelf();
+    delete aNode;
     assert (mem_node::InUseCount() == 0);
     return 0;
 }
index a51c066b53bc6c5d51a4fb954a3f6baa8f1549bf..b948e5edec7eacec527d31c4f092f59b47f710d7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: refcount.cc,v 1.3 2003/01/23 00:38:34 robertc Exp $
+ * $Id: refcount.cc,v 1.4 2003/08/04 22:14:58 robertc Exp $
  *
  * DEBUG: section xx    Refcount allocator
  * AUTHOR:  Robert Collins
 #include "squid.h"
 #include "RefCount.h"
 
-class _ToRefCount :public RefCountable {
+class _ToRefCount :public RefCountable
+{
+
 public:
     _ToRefCount () {++Instances;}
+
     ~_ToRefCount() {--Instances;}
-    int someMethod() {if (!this) exit(1);
-       return 1;}
-    void deleteSelf() const {delete this;}
+
+    int someMethod()
+    {
+        if (!this)
+            exit(1);
+
+        return 1;
+    }
+
     static int Instances;
+
 private:
 };
 
@@ -52,83 +62,93 @@ typedef RefCount<_ToRefCount> ToRefCount;
 /* Must be zero at the end for the test to pass. */
 int _ToRefCount::Instances = 0;
 
-class AlsoRefCountable : public RefCountable, public _ToRefCount {
-  public:
+class AlsoRefCountable : public RefCountable, public _ToRefCount
+{
+
+public:
     typedef RefCount<AlsoRefCountable> Pointer;
-    int doSomething() { if (!this) exit (1); return 1;}
+
+    int doSomething() { if (!this)
+            exit (1); return 1;}
 };
 
 int
 main (int argc, char **argv)
 {
     {
-      ToRefCount anObject(new _ToRefCount);
-      anObject->someMethod();
-      anObject = anObject;
-      ToRefCount objectTwo (anObject);
-      anObject = objectTwo;
-       {
-         ToRefCount anotherObject(new _ToRefCount);
-         anObject = anotherObject;
-       }
-       {
-         ToRefCount aForthObject (anObject);
-         anObject = ToRefCount(NULL);
-         aForthObject->someMethod();
-         aForthObject = NULL;
-       }
+        ToRefCount anObject(new _ToRefCount);
+        anObject->someMethod();
+        anObject = anObject;
+        ToRefCount objectTwo (anObject);
+        anObject = objectTwo;
+        {
+            ToRefCount anotherObject(new _ToRefCount);
+            anObject = anotherObject;
+        }
+
+        {
+            ToRefCount aForthObject (anObject);
+            anObject = ToRefCount(NULL);
+            aForthObject->someMethod();
+            aForthObject = NULL;
+        }
     }
+
     /* Test creating an object, using it , and then making available as a
      * refcounted one:
      */
     {
-      _ToRefCount *aPointer = new _ToRefCount;
-      aPointer->someMethod();
-      ToRefCount anObject(aPointer);
+        _ToRefCount *aPointer = new _ToRefCount;
+        aPointer->someMethod();
+        ToRefCount anObject(aPointer);
     }
     /* standalone pointers should be usable */
     {
-      ToRefCount anObject;
+        ToRefCount anObject;
     }
     /* Can we check pointers for equality */
     {
-      ToRefCount anObject;
-      ToRefCount anotherObject(new _ToRefCount);
-      if (anObject == anotherObject)
-         exit (1);
-      anotherObject = NULL;
-      if (!(anObject == anotherObject))
-         exit (1);
+        ToRefCount anObject;
+        ToRefCount anotherObject(new _ToRefCount);
+
+        if (anObject == anotherObject)
+            exit (1);
+
+        anotherObject = NULL;
+
+        if (!(anObject == anotherObject))
+            exit (1);
     }
     /* Can we get the pointer for a const object */
     {
-      ToRefCount anObject (new _ToRefCount);
-      ToRefCount const aConstObject (anObject);
-      _ToRefCount const *aPointer = aConstObject.getRaw();
-      if (aPointer != anObject.getRaw())
-         exit (2);
+        ToRefCount anObject (new _ToRefCount);
+        ToRefCount const aConstObject (anObject);
+        _ToRefCount const *aPointer = aConstObject.getRaw();
+
+        if (aPointer != anObject.getRaw())
+            exit (2);
     }
     /* Can we get a refcounted pointer from a const object */
     {
-      _ToRefCount const * aPointer = new _ToRefCount;
-      ToRefCount anObject (aPointer);
+        _ToRefCount const * aPointer = new _ToRefCount;
+        ToRefCount anObject (aPointer);
     }
     /* Can we get a pointer to nonconst from a nonconst refcounter */
     {
-      ToRefCount anObject (new _ToRefCount);
-      _ToRefCount *aPointer = anObject.getRaw();
-      aPointer = NULL;
+        ToRefCount anObject (new _ToRefCount);
+        _ToRefCount *aPointer = anObject.getRaw();
+        aPointer = NULL;
     }
     /* Create a doubley inheriting refcount instance,
      * cast to a single inheritance instance,
      * then hope :}
      */
     {
-      ToRefCount aBaseObject;
-       {
-         AlsoRefCountable::Pointer anObject (new AlsoRefCountable);
-         aBaseObject = anObject.getRaw();
-       }
+        ToRefCount aBaseObject;
+        {
+            AlsoRefCountable::Pointer anObject (new AlsoRefCountable);
+            aBaseObject = anObject.getRaw();
+        }
     }
     return _ToRefCount::Instances == 0 ? 0 : 1;
 }