diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-07-19 16:28:27 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-07-19 16:28:27 +0000 |
commit | 8ae60cf76f40bf5d371aede630f0b3a9f09e78cc (patch) | |
tree | b1472a2a2d70186dd948797fac83600241d73d87 | |
parent | 9773cf5f30f35394c69407d54f8eaedced602326 (diff) | |
download | ATCD-8ae60cf76f40bf5d371aede630f0b3a9f09e78cc.tar.gz |
ChangeLogTag:Mon Jul 19 09:25:58 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ace/Proactor.cpp | 36 |
2 files changed, 38 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog index bf9c4edb07c..4d5ad0eb57c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Jul 19 09:25:58 2004 Ossama Othman <ossama@dre.vanderbilt.edu> + + * ace/Proactor.cpp (timeout): + + Fixed leaked ACE_Asynch_Result_Impl instance. Thanks to + Fukasawa Mitsuo <fukasawa_mitsuo@nifty.com> for reporting the + problem. [Bug 1879] + Mon Jul 19 06:38:00 2004 Chad Elliott <elliott_c@ociweb.com> * bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm: diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp index 6a6d0979e9c..0bb6681c5d5 100644 --- a/ace/Proactor.cpp +++ b/ace/Proactor.cpp @@ -210,12 +210,14 @@ ACE_Proactor_Handle_Timeout_Upcall::timeout (TIMER_QUEUE &, -1); // Create the Asynch_Timer. - ACE_Asynch_Result_Impl *asynch_timer = this->proactor_->create_asynch_timer (*handler, - act, - time, - ACE_INVALID_HANDLE, - 0, - -1); + ACE_Asynch_Result_Impl *asynch_timer = + this->proactor_->create_asynch_timer (*handler, + act, + time, + ACE_INVALID_HANDLE, + 0, + -1); + if (asynch_timer == 0) ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%N:%l:(%P | %t):%p\n"), @@ -223,6 +225,8 @@ ACE_Proactor_Handle_Timeout_Upcall::timeout (TIMER_QUEUE &, ACE_LIB_TEXT ("create_asynch_timer failed")), -1); + auto_ptr<ACE_Asynch_Result_Impl> safe_asynch_timer (asynch_timer); + // Post a completion. if (asynch_timer->post_completion (this->proactor_->implementation ()) == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -1195,4 +1199,24 @@ ACE_Proactor::event_loop_done (void) return sig_atomic_t (1); } +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +# if defined (ACE_LACKS_AUTO_PTR) \ + || !(defined (ACE_HAS_STANDARD_CPP_LIBRARY) \ + && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)) +template class ACE_Auto_Basic_Ptr<ACE_Asynch_Result_Impl>; +# endif /* ACE_LACKS_AUTO_PTR */ +template class auto_ptr<ACE_Asynch_Result_Impl>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +# if defined (ACE_LACKS_AUTO_PTR) \ + || !(defined (ACE_HAS_STANDARD_CPP_LIBRARY) \ + && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)) +#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Asynch_Result_Impl> +# endif /* ACE_LACKS_AUTO_PTR */ +#pragma instanstiate auto_ptr<ACE_Asynch_Result_Impl> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + #endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/ |