diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 6a3d26c95c5..63fc22a7f11 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -625,7 +625,13 @@ IceInternal::ThreadPool::run() assert(_inUse > 0); --_inUse; } - + + // + // Do not wait to be promoted again to release these objects. + // + handler = 0; + workItem = 0; + while(!_promote) { wait(); diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 513b9f684ee..38576ced309 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2715,6 +2715,11 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) } C << nl << "bool __ok = __og.invoke();"; + + // + // Declare the return __ret variable at the top-level scope to + // enable NRVO with GCC (see also bug #3619). + // writeAllocateCode(C, ParamDeclList(), ret, p->getMetaData(), _useWstring); if(!p->returnsData()) { |