summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-04-01 23:23:10 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-04-01 23:23:10 +0000
commit7fa2478432903b9a8ceeb13b02f2946ae1c64dbf (patch)
tree92f31e65c54fd4ddef14531a8384b12374e2e5ab
parent84b9c202c5e9fb91a38c74e5e78f970655508c59 (diff)
downloadATCD-7fa2478432903b9a8ceeb13b02f2946ae1c64dbf.tar.gz
See my ChangeLog entry from 1 April 1999.
-rw-r--r--ChangeLog-99b59
-rw-r--r--ace/Containers.h7
-rw-r--r--ace/Containers_T.cpp13
-rw-r--r--ace/Containers_T.h19
-rw-r--r--ace/Event_Handler.h13
-rw-r--r--ace/Filecache.cpp16
-rw-r--r--ace/Filecache.h12
-rw-r--r--ace/IPC_SAP.h2
-rw-r--r--ace/Local_Tokens.h20
-rw-r--r--ace/Malloc.h14
-rw-r--r--ace/Memory_Pool.h30
-rw-r--r--ace/OS.h24
-rw-r--r--ace/OS.i4
-rw-r--r--ace/SOCK.h2
-rw-r--r--ace/SOCK_IO.h2
-rw-r--r--ace/SString.h6
-rw-r--r--ace/SV_Semaphore_Simple.h2
-rw-r--r--ace/Service_Object.h12
-rw-r--r--ace/Signal.h6
-rw-r--r--ace/Signal.i5
-rw-r--r--ace/Synch.h25
-rw-r--r--ace/Synch_Options.h6
-rw-r--r--ace/Synch_T.i4
-rw-r--r--ace/Trace.h6
24 files changed, 284 insertions, 25 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 85f9be122a5..6bcb9f5817c 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,62 @@
+Thu Apr 1 16:22:18 1999 Ossama Othman <othman@cs.wustl.edu>
+
+ * ace/Containers_T.h (ACE_Unbounded_Set_Iterator):
+ * ace/Containers_T.cpp (ACE_Unbounded_Set_Iterator):
+ The signatures for the prefix and postfix operators were
+ switched. Prefix operators take a void and return a
+ a reference and postfix operators take an int and returns a
+ copy.
+
+ * ace/Containers.h (ACE_DLList_Node):
+ * ace/Containers_T.h (ACE_Double_Linked_List):
+ * ace/Containers_T.h (ACE_Unbounded_Set_Iterator):
+ * ace/Event_Handler.h (ACE_Event_Handler):
+ * ace/Event_Handler.h (ACE_Notification_Buffer):
+ * ace/Filecache.h (ACE_Filecache_Handle):
+ * ace/Filecache.h (ACE_Filecache_Object):
+ * ace/Local_Tokens.h (ACE_TPQ_Iterator):
+ * ace/Local_Tokens.h (ACE_Token_Proxy):
+ * ace/Local_Tokens.h (ACE_Token_Proxy_Queue):
+ * ace/Malloc.h (ACE_Name_Node):
+ * ace/Malloc.h (ACE_Static_Allocator_Base):
+ * ace/Memory_Pool.h (ACE_MMAP_Memory_Pool):
+ * ace/Memory_Pool.h (ACE_MMAP_Memory_Pool_Options):
+ * ace/Memory_Pool.h (ACE_Shared_Memory_Pool):
+ * ace/Memory_Pool.h (ACE_Shared_Memory_Pool_Options):
+ * ace/OS.h (ACE_Countdown_Time):
+ * ace/OS.h (ACE_Thread_Adapter):
+ * ace/OS.h (ACE_Thread_Control):
+ * ace/OS.h (ACE_Thread_Exit):
+ * ace/Service_Object.h (ACE_Service_Type):
+ * ace/Signal.h (ACE_Sig_Adapter):
+ * ace/Synch.h (ACE_Adaptive_Lock):
+ * ace/Synch.h (ACE_TSS_Adapter):
+ Explicitly disallow use of implicitly generated copy
+ constructor and assignment operator to prevent inadvertent
+ memory leaks.
+
+ * ace/Filecache.cpp (ACE_Filecache_Object):
+ * ace/OS.i (ACE_Time_Value):
+ * ace/Signal.i (ACE_Sig_Action):
+ * ace/Signal.i (ACE_Sig_Guard):
+ * ace/Signal.i (ACE_Sig_Set):
+ * ace/Synch_T.i (ACE_Guard):
+ Added base member initializers for class members that weren't
+ initialized. Better style and helps avoid some warnings.
+
+ * ace/IPC_SAP.h (ACE_IPC_SAP):
+ * ace/SOCK.h (ACE_SOCK):
+ * ace/SOCK_IO.h (ACE_SOCK_IO):
+ * ace/SV_Semaphore_Simple.h (ACE_SV_Semaphore_Simple):
+ * ace/Synch.h (ACE_Barrier):
+ * ace/Synch.h (ACE_Event):
+ * ace/Synch.h (ACE_Guard):
+ * ace/Synch.h (ACE_Null_Mutex):
+ * ace/Synch.h (ACE_RW_Mutex):
+ * ace/Synch.h (ACE_Semaphore):
+ Made base class destructor virtual to ensure that it gets
+ called by derived class destructor.
+
Thu Apr 1 13:31:56 1999 Jeff Parsons <parsons@cs.wustl.edu>
* ace/CDR_Stream.{i,cpp}:
diff --git a/ace/Containers.h b/ace/Containers.h
index 73d73c54b8f..7f9704e4061 100644
--- a/ace/Containers.h
+++ b/ace/Containers.h
@@ -54,6 +54,13 @@ public:
protected:
ACE_DLList_Node (void);
+
+private:
+ //ACE_DLList_Node (const ACE_DLList_Node &);
+ ACE_DLList_Node & operator= (const ACE_DLList_Node & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
#if defined (__ACE_INLINE__)
diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp
index 6b8e51a7076..565900d6b64 100644
--- a/ace/Containers_T.cpp
+++ b/ace/Containers_T.cpp
@@ -1727,19 +1727,24 @@ ACE_Unbounded_Set_Iterator<T>::next (T *&item)
}
template <class T> ACE_Unbounded_Set_Iterator<T>
-ACE_Unbounded_Set_Iterator<T>::operator++ (void)
+ACE_Unbounded_Set_Iterator<T>::operator++ (int)
{
- //ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator++ ()");
+ //ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator++ (int)");
ACE_Unbounded_Set_Iterator<T> retv (*this);
+ // postfix operator
+
this->advance ();
return retv;
}
template <class T> ACE_Unbounded_Set_Iterator<T>&
-ACE_Unbounded_Set_Iterator<T>::operator++ (int)
+ACE_Unbounded_Set_Iterator<T>::operator++ (void)
{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator++ (int)");
+ // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator++ (void)");
+
+ // prefix operator
+
this->advance ();
return *this;
}
diff --git a/ace/Containers_T.h b/ace/Containers_T.h
index d16250bd4aa..ebefca4e561 100644
--- a/ace/Containers_T.h
+++ b/ace/Containers_T.h
@@ -580,6 +580,14 @@ protected:
// Remember where we are.
ACE_Double_Linked_List<T> &dllist_;
+
+private:
+ ACE_Double_Linked_List_Iterator (const ACE_Double_Linked_List_Iterator &);
+ ACE_Double_Linked_List_Iterator &
+ operator= (const ACE_Double_Linked_List_Iterator & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
template <class T>
@@ -829,10 +837,10 @@ public:
// = STL styled iteration, compare, and reference functions.
- ACE_Unbounded_Set_Iterator<T> operator++ (void);
+ ACE_Unbounded_Set_Iterator<T> operator++ (int);
// Postfix advance.
- ACE_Unbounded_Set_Iterator<T>& operator++ (int);
+ ACE_Unbounded_Set_Iterator<T>& operator++ (void);
// Prefix advance.
T& operator* (void);
@@ -846,6 +854,13 @@ public:
// Declare the dynamic allocation hooks.
private:
+ // ACE_Unbounded_Set_Iterator (const ACE_Unbounded_Set_Iterator<T> &)
+ ACE_Unbounded_Set_Iterator<T> &
+ operator= (const ACE_Unbounded_Set_Iterator<T> & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
ACE_Node<T> *current_;
// Pointer to the current node in the iteration.
diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h
index c29866167d0..a5f484310bc 100644
--- a/ace/Event_Handler.h
+++ b/ace/Event_Handler.h
@@ -152,6 +152,12 @@ protected:
// Force ACE_Event_Handler to be an abstract base class.
private:
+ ACE_Event_Handler (const ACE_Event_Handler &);
+ ACE_Event_Handler & operator= (const ACE_Event_Handler & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
int priority_;
// Priority of this Event_Handler.
@@ -179,6 +185,13 @@ public:
ACE_Reactor_Mask mask_;
// Mask that indicates which method to call.
+
+private:
+ ACE_Notification_Buffer (const ACE_Notification_Buffer &);
+ ACE_Notification_Buffer & operator= (const ACE_Notification_Buffer & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
#if defined (__ACE_INLINE__)
diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp
index 035e14eb932..cde8ff419c7 100644
--- a/ace/Filecache.cpp
+++ b/ace/Filecache.cpp
@@ -46,13 +46,14 @@ ACE_Filecache_Handle::init (void)
}
ACE_Filecache_Handle::ACE_Filecache_Handle (void)
+ : file_ (0), handle_ (0), mapit_ (0)
{
this->init ();
}
ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
ACE_Filecache_Flag mapit)
- : mapit_ (mapit)
+ : file_ (0), handle_ (0), mapit_ (mapit)
{
this->init ();
// Fetch the file from the Virtual_Filesystem let the
@@ -66,7 +67,7 @@ ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
int size,
ACE_Filecache_Flag mapit)
- : mapit_ (mapit)
+ : file_ (0), handle_ (0), mapit_ (mapit)
{
this->init ();
// Since this is being opened for a write, simply create a new
@@ -417,8 +418,9 @@ ACE_Filecache_Object::init (void)
}
ACE_Filecache_Object::ACE_Filecache_Object (void)
- : stale_ (0),
- lock_ (junklock_)
+ : tempname_ (0), mmap_ (0), handle_ (0), stat_ (), size_ (0),
+ action_ (0), error_ (0), stale_ (0), sa_ (),
+ junklock_ (), lock_ (junklock_)
{
this->init ();
}
@@ -427,9 +429,9 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa,
int mapit)
- : stale_ (0),
- sa_ (sa),
- lock_ (lock)
+ : tempname_ (0), mmap_ (0), handle_ (0), stat_ (), size_ (0),
+ action_ (0), error_ (0), stale_ (0), sa_ (sa), junklock_ (),
+ lock_ (lock_)
{
this->init ();
diff --git a/ace/Filecache.h b/ace/Filecache.h
index 8a392c6f290..db2007e8a1a 100644
--- a/ace/Filecache.h
+++ b/ace/Filecache.h
@@ -139,6 +139,12 @@ public:
};
private:
+ ACE_Filecache_Handle (const ACE_Filecache_Handle &);
+ ACE_Filecache_Handle & operator= (const ACE_Filecache_Handle & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
ACE_Filecache_Object *file_;
// A reference to the low level instance.
@@ -316,6 +322,12 @@ public:
};
private:
+ ACE_Filecache_Object (const ACE_Filecache_Object &);
+ ACE_Filecache_Object & operator= (const ACE_Filecache_Object & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
char *tempname_;
char filename_[MAXPATHLEN + 1];
// The temporary file name and the real file name. The real file is
diff --git a/ace/IPC_SAP.h b/ace/IPC_SAP.h
index e6ee95e1d45..39f6f59d5bc 100644
--- a/ace/IPC_SAP.h
+++ b/ace/IPC_SAP.h
@@ -29,7 +29,7 @@ class ACE_Export ACE_IPC_SAP
// Defines the member functions for the base class of the
// ACE_IPC_SAP abstraction.
public:
- ~ACE_IPC_SAP (void);
+ virtual ~ACE_IPC_SAP (void);
// Default dtor.
int control (int cmd, void *) const;
diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h
index e797f5b7ee9..7bdb5f15b2c 100644
--- a/ace/Local_Tokens.h
+++ b/ace/Local_Tokens.h
@@ -248,6 +248,12 @@ public:
// Dump the state of an object.
private:
+ ACE_TPQ_Iterator (const ACE_TPQ_Iterator &);
+ ACE_TPQ_Iterator & operator= (const ACE_TPQ_Iterator & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
ACE_TPQ_Entry *current_;
};
@@ -307,6 +313,13 @@ protected:
// Tail.
int size_;
// Size.
+
+private:
+ ACE_Token_Proxy_Queue (const ACE_Token_Proxy_Queue &);
+ ACE_Token_Proxy_Queue & operator= (const ACE_Token_Proxy_Queue & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
// 5..
@@ -828,6 +841,13 @@ protected:
virtual ACE_Tokens *create_token (const ASYS_TCHAR *name) = 0;
// Make the correct type of ACE_Tokens. This is called by the Token
// Manager.
+
+private:
+ //ACE_Token_Proxy (const ACE_Token_Proxy &);
+ ACE_Token_Proxy & operator= (const ACE_Token_Proxy & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
// 8..
diff --git a/ace/Malloc.h b/ace/Malloc.h
index 57e240da004..07fb12c6738 100644
--- a/ace/Malloc.h
+++ b/ace/Malloc.h
@@ -115,6 +115,12 @@ public:
void dump (void) const;
// Dump the state of the object.
+private:
+ ACE_Name_Node (const ACE_Name_Node &);
+ ACE_Name_Node & operator= (const ACE_Name_Node & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
class ACE_Export ACE_Control_Block
@@ -250,6 +256,14 @@ protected:
size_t offset_;
// Pointer to the current offset in the <buffer_>.
+
+private:
+ ACE_Static_Allocator_Base (const ACE_Static_Allocator_Base &);
+ ACE_Static_Allocator_Base &
+ operator= (const ACE_Static_Allocator_Base & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
#if defined (__ACE_INLINE__)
diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h
index 1c7223e4cfa..0d5e36c66da 100644
--- a/ace/Memory_Pool.h
+++ b/ace/Memory_Pool.h
@@ -127,6 +127,14 @@ public:
size_t file_perms_;
// File permissions to use when creating/opening a segment.
+
+private:
+ ACE_Shared_Memory_Pool_Options (const ACE_Shared_Memory_Pool_Options &);
+ ACE_Shared_Memory_Pool_Options &
+ operator= (const ACE_Shared_Memory_Pool_Options & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
class ACE_Export ACE_Shared_Memory_Pool : public ACE_Event_Handler
@@ -238,6 +246,13 @@ protected:
virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
// Handle SIGSEGV and SIGBUS signals to remap shared memory
// properly.
+
+private:
+ ACE_Shared_Memory_Pool (const ACE_Shared_Memory_Pool &);
+ ACE_Shared_Memory_Pool & operator= (const ACE_Shared_Memory_Pool & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
#endif /* !ACE_LACKS_SYSV_SHMEM */
@@ -354,6 +369,14 @@ public:
LPSECURITY_ATTRIBUTES sa_;
// Pointer to a security attributes object. Only used on NT.
+
+private:
+ ACE_MMAP_Memory_Pool_Options (const ACE_MMAP_Memory_Pool_Options &);
+ ACE_MMAP_Memory_Pool_Options &
+ operator= (const ACE_MMAP_Memory_Pool_Options & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
class ACE_Export ACE_MMAP_Memory_Pool : public ACE_Event_Handler
@@ -467,6 +490,13 @@ protected:
LPSECURITY_ATTRIBUTES sa_;
// Security attributes object, only used on NT.
+
+private:
+ ACE_MMAP_Memory_Pool (const ACE_MMAP_Memory_Pool &);
+ ACE_MMAP_Memory_Pool & operator= (const ACE_MMAP_Memory_Pool & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
class ACE_Export ACE_Lite_MMAP_Memory_Pool : public ACE_MMAP_Memory_Pool
diff --git a/ace/OS.h b/ace/OS.h
index 0c50c57c6be..8d3f9e50a18 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -1360,6 +1360,12 @@ public:
// call to stop.
private:
+ ACE_Countdown_Time (const ACE_Countdown_Time &);
+ ACE_Countdown_Time & operator= (const ACE_Countdown_Time & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
ACE_Time_Value *max_wait_time_;
// Maximum time we were willing to wait.
@@ -4375,6 +4381,12 @@ public:
// routine.
private:
+ ACE_Thread_Adapter (const ACE_Thread_Adapter &);
+ ACE_Thread_Adapter & operator= (const ACE_Thread_Adapter & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
~ACE_Thread_Adapter (void);
// Ensure that this object must be allocated on the heap.
@@ -4484,6 +4496,12 @@ public:
// Declare the dynamic allocation hooks.
private:
+ ACE_Thread_Control (const ACE_Thread_Control &);
+ ACE_Thread_Control & operator= (const ACE_Thread_Control & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
ACE_Thread_Manager *tm_;
// Pointer to the thread manager for this block of code.
@@ -4530,6 +4548,12 @@ public:
// singleton.
private:
+ ACE_Thread_Exit (const ACE_Thread_Exit &);
+ ACE_Thread_Exit & operator= (const ACE_Thread_Exit & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
void *status_;
// Exit status...
diff --git a/ace/OS.i b/ace/OS.i
index 9ad38618950..e3a938c3040 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -177,6 +177,7 @@ ACE_Time_Value::set (const timeval &tv)
ACE_INLINE
ACE_Time_Value::ACE_Time_Value (const timeval &tv)
+ : tv_ ()
{
// ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (tv);
@@ -184,6 +185,7 @@ ACE_Time_Value::ACE_Time_Value (const timeval &tv)
ACE_INLINE
ACE_Time_Value::ACE_Time_Value (void)
+ : tv_ ()
{
// ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (0, 0);
@@ -193,6 +195,7 @@ ACE_Time_Value::ACE_Time_Value (void)
ACE_INLINE
ACE_Time_Value::ACE_Time_Value (long sec, long usec)
+ : tv_ ()
{
// ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (sec, usec);
@@ -254,6 +257,7 @@ ACE_Time_Value::operator timespec_t () const
ACE_INLINE
ACE_Time_Value::ACE_Time_Value (const timespec_t &tv)
+ : tv_ ()
{
// ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (tv);
diff --git a/ace/SOCK.h b/ace/SOCK.h
index ff7fe250221..b9a81468c83 100644
--- a/ace/SOCK.h
+++ b/ace/SOCK.h
@@ -39,7 +39,7 @@ class ACE_Export ACE_SOCK : public ACE_IPC_SAP
// set socket options, get the local and remote addresses, and
// close the socket.
public:
- ~ACE_SOCK (void);
+ virtual ~ACE_SOCK (void);
// Default ctor/dtor.
int set_option (int level,
diff --git a/ace/SOCK_IO.h b/ace/SOCK_IO.h
index 26700cc4064..e9d1ab9ff52 100644
--- a/ace/SOCK_IO.h
+++ b/ace/SOCK_IO.h
@@ -34,7 +34,7 @@ public:
ACE_SOCK_IO (void);
// Constructor.
- ~ACE_SOCK_IO (void);
+ virtual ~ACE_SOCK_IO (void);
// Destructor.
ssize_t send (const void *buf,
diff --git a/ace/SString.h b/ace/SString.h
index 4a9b3dd0e18..cd1f7e2f488 100644
--- a/ace/SString.h
+++ b/ace/SString.h
@@ -533,6 +533,12 @@ protected:
// preserve designator.
private:
+ ACE_Tokenizer (const ACE_Tokenizer &);
+ ACE_Tokenizer & operator= (const ACE_Tokenizer & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
LPTSTR buffer_;
int index_;
diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h
index c904b07820e..e7ec488f33c 100644
--- a/ace/SV_Semaphore_Simple.h
+++ b/ace/SV_Semaphore_Simple.h
@@ -49,7 +49,7 @@ public:
int initial_value = 1,
u_short nsems = 1,
int perms = ACE_DEFAULT_FILE_PERMS);
- ~ACE_SV_Semaphore_Simple (void);
+ virtual ~ACE_SV_Semaphore_Simple (void);
int open (const char *name,
int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
diff --git a/ace/Service_Object.h b/ace/Service_Object.h
index 0c73e2c20af..28179f828d9 100644
--- a/ace/Service_Object.h
+++ b/ace/Service_Object.h
@@ -105,6 +105,12 @@ public:
// Declare the dynamic allocation hooks.
private:
+ ACE_Service_Type (const ACE_Service_Type &);
+ ACE_Service_Type & operator= (const ACE_Service_Type & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
const ASYS_TCHAR *name_;
// Humanly readible name of svc.
@@ -152,6 +158,12 @@ public:
// Smart pointer to access the underlying <ACE_Service_Object>.
private:
+ // ACE_Service_Object_Ptr (const ACE_Service_Object_Ptr &);
+ ACE_Service_Object_Ptr & operator= (const ACE_Service_Object_Ptr & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
ACE_Service_Object *service_object_;
// Holds the service object until we're done.
};
diff --git a/ace/Signal.h b/ace/Signal.h
index dc92c572b80..1c45e6b6fe6 100644
--- a/ace/Signal.h
+++ b/ace/Signal.h
@@ -287,6 +287,12 @@ public:
// Called by the <Reactor> to dispatch the signal handler.
private:
+ ACE_Sig_Adapter (const ACE_Sig_Adapter &);
+ ACE_Sig_Adapter & operator= (const ACE_Sig_Adapter & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
int sigkey_;
// Key for this signal handler (used to remove it).
diff --git a/ace/Signal.i b/ace/Signal.i
index e9711a640c8..c98948c6ee1 100644
--- a/ace/Signal.i
+++ b/ace/Signal.i
@@ -6,6 +6,7 @@
ACE_INLINE
ACE_Sig_Set::ACE_Sig_Set (sigset_t *ss)
+ : sigset_ ()
{
ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set");
@@ -18,6 +19,7 @@ ACE_Sig_Set::ACE_Sig_Set (sigset_t *ss)
ACE_INLINE
ACE_Sig_Set::ACE_Sig_Set (int fill)
+ : sigset_ ()
{
ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set");
@@ -29,6 +31,7 @@ ACE_Sig_Set::ACE_Sig_Set (int fill)
ACE_INLINE
ACE_Sig_Set::ACE_Sig_Set (ACE_Sig_Set *ss)
+ : sigset_ ()
{
ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set");
@@ -193,6 +196,7 @@ ACE_Sig_Action::operator ACE_SIGACTION * ()
ACE_INLINE
ACE_Sig_Action::ACE_Sig_Action (const ACE_Sig_Action &s)
+ : sa_ ()
{
ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
*this = s; // structure copy.
@@ -226,6 +230,7 @@ ACE_Sig_Action::restore_action (int signum, ACE_Sig_Action &oaction)
ACE_INLINE
ACE_Sig_Guard::ACE_Sig_Guard (ACE_Sig_Set *mask)
+ : omask_ ()
{
//ACE_TRACE ("ACE_Sig_Guard::ACE_Sig_Guard");
diff --git a/ace/Synch.h b/ace/Synch.h
index 21415ad495a..fa9ccc973d4 100644
--- a/ace/Synch.h
+++ b/ace/Synch.h
@@ -131,6 +131,13 @@ protected:
// must overwrite this method for this class to work.
ACE_Lock *lock_;
+
+private:
+ ACE_Adaptive_Lock (const ACE_Adaptive_Lock &);
+ ACE_Adaptive_Lock & operator= (const ACE_Adaptive_Lock & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
class ACE_Export ACE_File_Lock
@@ -244,7 +251,7 @@ public:
int max = 0x7fffffff);
// Initialize the semaphore, with initial value of "count".
- ~ACE_Semaphore (void);
+ virtual ~ACE_Semaphore (void);
// Implicitly destroy the semaphore.
int remove (void);
@@ -446,7 +453,7 @@ public:
void *arg = 0);
// Initialize a readers/writer lock.
- ~ACE_RW_Mutex (void);
+ virtual ~ACE_RW_Mutex (void);
// Implicitly destroy a readers/writer lock
int remove (void);
@@ -764,7 +771,7 @@ class ACE_Export ACE_Null_Mutex
// no ops.
public:
ACE_Null_Mutex (LPCTSTR = 0);
- ~ACE_Null_Mutex (void);
+ virtual ~ACE_Null_Mutex (void);
int remove (void);
int acquire (void);
@@ -885,6 +892,12 @@ public:
ACE_THR_DEST func_;
// The real cleanup routine for ts_obj;
+private:
+ ACE_TSS_Adapter (const ACE_TSS_Adapter &);
+ ACE_TSS_Adapter & operator= (const ACE_TSS_Adapter & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
};
class ACE_Export ACE_Event
@@ -903,7 +916,7 @@ public:
void *arg = 0);
// Constructor which will create event.
- ~ACE_Event (void);
+ virtual ~ACE_Event (void);
// Implicitly destroy the event variable.
int remove (void);
@@ -1033,7 +1046,7 @@ class ACE_Barrier
// This is a no-op to make ACE "syntactically consistent."
public:
ACE_Barrier (u_int, LPCTSTR = 0, void * = 0) {}
- ~ACE_Barrier (void) {}
+ virtual ~ACE_Barrier (void) {}
int wait (void) { ACE_NOTSUP_RETURN (-1); }
void dump (void) const {}
};
@@ -1577,7 +1590,7 @@ public:
// = Initialization and termination methods.
ACE_Guard (ACE_Null_Mutex &) {}
ACE_Guard (ACE_Null_Mutex &, int) {}
- ~ACE_Guard (void) {}
+ virtual ~ACE_Guard (void) {}
int acquire (void) { return 0; }
int tryacquire (void) { return 0; }
diff --git a/ace/Synch_Options.h b/ace/Synch_Options.h
index 2b40bf5d9e3..2e3cb86f53e 100644
--- a/ace/Synch_Options.h
+++ b/ace/Synch_Options.h
@@ -128,6 +128,12 @@ public:
// Declare the dynamic allocation hooks.
private:
+ // ACE_Synch_Options (const ACE_Synch_Options &);
+ ACE_Synch_Options & operator= (const ACE_Synch_Options & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
u_long options_;
// Keeps track of the enabled options.
diff --git a/ace/Synch_T.i b/ace/Synch_T.i
index 2df9c2f0656..c4e1b9d8d06 100644
--- a/ace/Synch_T.i
+++ b/ace/Synch_T.i
@@ -7,14 +7,14 @@
template <class ACE_LOCK> ACE_INLINE
ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l)
- : lock_ (&l)
+ : lock_ (&l), owner_ (0)
{
this->acquire ();
}
template <class ACE_LOCK> ACE_INLINE
ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block)
- : lock_ (&l)
+ : lock_ (&l), owner_ (0)
{
if (block)
this->acquire ();
diff --git a/ace/Trace.h b/ace/Trace.h
index e0f52b6d2df..0ff0d32a3d6 100644
--- a/ace/Trace.h
+++ b/ace/Trace.h
@@ -57,6 +57,12 @@ public:
// Dump the state of an object.
private:
+ ACE_Trace (const ACE_Trace &);
+ ACE_Trace & operator= (const ACE_Trace & rhs);
+ // Explicitly disallow use of implicitly generated copy
+ // constructor and assignment operator to prevent inadvertent
+ // memory leaks.
+
// Keeps track of how deeply the call stack is nested (this is
// maintained in thread-specific storage to ensure correctness in
// multiple threads of control.