summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index ebbe663ceb7..a86ef6afc26 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -331,10 +331,10 @@ IceInternal::Instance::setDefaultContext(const Context& ctx)
throw CommunicatorDestroyedException(__FILE__, __LINE__);
}
- _defaultContext = ctx;
+ _defaultContext = new SharedContext(ctx);
}
-Context
+SharedContextPtr
IceInternal::Instance::getDefaultContext() const
{
IceUtil::RecMutex::Lock sync(*this);
@@ -459,7 +459,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
_serverACM(0),
_threadPerConnection(false),
_threadPerConnectionStackSize(0),
- _defaultContext(initData.defaultContext)
+ _defaultContext(new SharedContext(initData.defaultContext))
{
try
{