diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-11 18:13:40 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-11 18:13:40 +0000 |
commit | 6b7808bef2b9dbf7e2a67a548835bec3f16a9c12 (patch) | |
tree | b56c2ba4f5e2b89973c25b54be86d59e419b96be /ace/Svc_Handler.h | |
parent | 644ff358944b4e53a3c43a4a638dfc39304d499f (diff) | |
download | ATCD-6b7808bef2b9dbf7e2a67a548835bec3f16a9c12.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Svc_Handler.h')
-rw-r--r-- | ace/Svc_Handler.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h index bf5709125f8..30cba9a5b00 100644 --- a/ace/Svc_Handler.h +++ b/ace/Svc_Handler.h @@ -104,6 +104,10 @@ public: // Returns the underlying PEER_STREAM (used by // ACE_Acceptor::accept() and ACE_Connector::connect() factories). + void *operator new (size_t n); + // Overloaded new operator. This is used to unobtrusively detect + // when a Svc_Handler is allocated dynamically. + virtual void destroy (void); // Call this instead of <delete> to free up dynamically allocated // <Svc_Handlers> (otherwise you will get memory leaks). This @@ -111,9 +115,11 @@ public: // and can act accordingly (i.e., deleting it if it was allocated // dynamically, otherwise ignoring it). - void *operator new (size_t n); - // Overloaded new operator. This is used to unobtrusively detect - // when a Svc_Handler is allocated dynamically. + void operator delete (void *); + // This really should be private so that users are forced to call + // <destroy>. Unfortunately, the C++ standard doesn't allow there + // to be a public new and a private delete. It is a bad idea to + // call this method directly, so use <destroy> instead. void shutdown (void); // Close down the descriptor and unregister from the Reactor @@ -123,13 +129,6 @@ public: public: - void operator delete (void *); - // This really should be private so that users are forced to call - // destroy(). Unfortunately, the C++ standard doesn't allow there - // to be a public new and a private delete. - -public: - // Note: The following methods are not suppose to be public. But // because friendship is *not* inherited in C++, these methods have // to be public. |