summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Outgoing.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp
index 5254cd158b9..1f9a290582c 100644
--- a/cpp/src/Ice/Outgoing.cpp
+++ b/cpp/src/Ice/Outgoing.cpp
@@ -593,6 +593,7 @@ IceInternal::BatchOutgoing::invoke()
void
IceInternal::BatchOutgoing::sent(bool notify)
{
+ _remoteObserver.detach();
if(notify)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
@@ -603,7 +604,11 @@ IceInternal::BatchOutgoing::sent(bool notify)
{
_sent = true;
}
- _remoteObserver.detach();
+ //
+ // NOTE: At this point the stack allocated BatchOutgoing object
+ // can be destroyed since the notify() on the monitor will release
+ // the thread waiting on the synchronous Ice call.
+ //
}
void