diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-07-20 21:34:50 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-07-20 21:34:50 +0000 |
commit | c00e785b3a362f7e51176fea2d45e2f02a29f298 (patch) | |
tree | 99846b76f8d3b2f64355d9d183cc704dd314a834 /cpp/src/Ice/Instance.cpp | |
parent | Merge from R3_1_branch (diff) | |
download | ice-c00e785b3a362f7e51176fea2d45e2f02a29f298.tar.bz2 ice-c00e785b3a362f7e51176fea2d45e2f02a29f298.tar.xz ice-c00e785b3a362f7e51176fea2d45e2f02a29f298.zip |
Optimized context to avoid copies
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 6 |
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 { |