summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-07-15 14:59:37 +0000
committerAlan Conway <aconway@apache.org>2008-07-15 14:59:37 +0000
commit08ee49c5cbabfaa6906e5bae39ab3677dc207fc4 (patch)
tree20d5a1aa4c207254e53ef22b66fabbb42ac2e36a /cpp/src/tests
parent64d1a8e63e8a7f82837e8de095e5d23837835e65 (diff)
downloadqpid-python-08ee49c5cbabfaa6906e5bae39ab3677dc207fc4.tar.gz
Switched from shared_ptr to intrusive_ptr and RefCounted for Broker.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676932 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/BrokerFixture.h2
-rw-r--r--cpp/src/tests/ForkedBroker.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/tests/BrokerFixture.h b/cpp/src/tests/BrokerFixture.h
index b28dfe9c0c..09cca066ef 100644
--- a/cpp/src/tests/BrokerFixture.h
+++ b/cpp/src/tests/BrokerFixture.h
@@ -36,7 +36,7 @@
*/
struct BrokerFixture : private boost::noncopyable {
typedef qpid::broker::Broker Broker;
- typedef boost::shared_ptr<Broker> BrokerPtr;
+ typedef boost::intrusive_ptr<Broker> BrokerPtr;
BrokerPtr broker;
qpid::sys::Thread brokerThread;
diff --git a/cpp/src/tests/ForkedBroker.h b/cpp/src/tests/ForkedBroker.h
index 5fb1ce8478..e01034c355 100644
--- a/cpp/src/tests/ForkedBroker.h
+++ b/cpp/src/tests/ForkedBroker.h
@@ -91,7 +91,7 @@ class ForkedBroker : public qpid::sys::ForkWithMessage {
prefix += boost::lexical_cast<std::string>(long(getpid()));
qpid::log::Logger::instance().setPrefix(prefix);
opts.port = 0;
- boost::shared_ptr<qpid::broker::Broker> broker(new qpid::broker::Broker(opts));
+ boost::intrusive_ptr<qpid::broker::Broker> broker(new qpid::broker::Broker(opts));
qpid::broker::SignalHandler::setBroker(broker);
QPID_LOG(info, "ForkedBroker started on " << broker->getPort());
ready(boost::lexical_cast<std::string>(broker->getPort())); // Notify parent.
@@ -99,8 +99,8 @@ class ForkedBroker : public qpid::sys::ForkWithMessage {
QPID_LOG(notice, "ForkedBroker exiting.");
// Force exit in the child process, otherwise we will try to
- // carry with parent tests.
- broker.reset(); // Run broker dtor before we exit.
+ // carry with parent tests.
+ broker = 0; // Run broker dtor before we exit.
exit(0);
}