summaryrefslogtreecommitdiff
path: root/qpid/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
commit366cfe83be878328da6b6e8a96763a29f1963bb8 (patch)
tree808c67e2d8191cdf224fca559d2699941fe03ec2 /qpid/cpp/src/tests
parent3e93cf6e12cbe10f16b3c98357c5fc36e8a3e345 (diff)
downloadqpid-python-366cfe83be878328da6b6e8a96763a29f1963bb8.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@676932 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rw-r--r--qpid/cpp/src/tests/BrokerFixture.h2
-rw-r--r--qpid/cpp/src/tests/ForkedBroker.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/BrokerFixture.h b/qpid/cpp/src/tests/BrokerFixture.h
index b28dfe9c0c..09cca066ef 100644
--- a/qpid/cpp/src/tests/BrokerFixture.h
+++ b/qpid/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/qpid/cpp/src/tests/ForkedBroker.h b/qpid/cpp/src/tests/ForkedBroker.h
index 5fb1ce8478..e01034c355 100644
--- a/qpid/cpp/src/tests/ForkedBroker.h
+++ b/qpid/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);
}