summaryrefslogtreecommitdiff
path: root/ACE/tests/Bug_2540_Regression_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/Bug_2540_Regression_Test.cpp')
-rw-r--r--ACE/tests/Bug_2540_Regression_Test.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/ACE/tests/Bug_2540_Regression_Test.cpp b/ACE/tests/Bug_2540_Regression_Test.cpp
index 66f1f4f4ddb..2a05b97cb6d 100644
--- a/ACE/tests/Bug_2540_Regression_Test.cpp
+++ b/ACE/tests/Bug_2540_Regression_Test.cpp
@@ -16,6 +16,7 @@
#include "ace/Event_Handler.h"
#include "ace/Reactor.h"
#include "ace/Select_Reactor.h"
+#include "ace/Auto_Ptr.h"
ACE_RCSID (tests,
Bug_2540_Regression_Test,
@@ -70,7 +71,7 @@ private:
* in a repeating interval. On the first @c initial_iterations the Timer
* writes data through all of its handlers. On iteration @c initial_iteration
* it triggers bug 2540 by removing two handlers from the reactor.
- *
+ *
*/
class Timer : public ACE_Event_Handler
{
@@ -109,8 +110,11 @@ run_main (int, ACE_TCHAR *[])
// regardless of platform. In particular, this test relies on a handler
// that doesn't consume ready-to-read data being called back - this won't
// happen with ACE_WFMO_Reactor.
- ACE_Select_Reactor select_reactor;
- ACE_Reactor reactor (&select_reactor);
+ ACE_Select_Reactor *impl_ptr = 0;
+ ACE_NEW_RETURN (impl_ptr, ACE_Select_Reactor, -1);
+ auto_ptr<ACE_Select_Reactor> auto_impl (impl_ptr);
+
+ ACE_Reactor reactor (impl_ptr);
// Create the timer, this is the main driver for the test
Timer * timer = new Timer;