diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-02-04 12:05:27 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-02-04 12:05:27 +0100 |
commit | 19306bade9b6ba94d55c74c2d56f2fc3c5e3e1e6 (patch) | |
tree | e751de37a78f2510c9215d76b575456599bdbe5f /cpp/src/Ice/OutgoingAsync.cpp | |
parent | Fixed (ICE-5211) - use @loader_path in OS X libraries and binaries instead of... (diff) | |
download | ice-19306bade9b6ba94d55c74c2d56f2fc3c5e3e1e6.tar.bz2 ice-19306bade9b6ba94d55c74c2d56f2fc3c5e3e1e6.tar.xz ice-19306bade9b6ba94d55c74c2d56f2fc3c5e3e1e6.zip |
Fixed ICE-4012 - release marshaling buffer sooner than later
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 9d15133ad8a..76cca831525 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -275,6 +275,7 @@ Ice::AsyncResult::__exception(const Ice::Exception& ex) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); _state |= Done; + _os.resize(0); // Clear buffer now, instead of waiting for AsyncResult deallocation _exception.reset(ex.ice_clone()); _monitor.notifyAll(); } @@ -521,6 +522,7 @@ IceInternal::OutgoingAsync::__sent(Ice::ConnectionI* connection) _observer.detach(); } _state |= Done | OK; + _os.resize(0); // Clear buffer now, instead of waiting for AsyncResult deallocation } else if(connection->timeout() > 0) { @@ -749,6 +751,7 @@ IceInternal::OutgoingAsync::__finished(BasicStream& is) } _state |= Done; + _os.resize(0); // Clear buffer now, instead of waiting for AsyncResult deallocation if(replyStatus == replyOK) { _state |= OK; @@ -904,6 +907,7 @@ IceInternal::BatchOutgoingAsync::__sent(Ice::ConnectionI* /*connection*/) IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); assert(!_exception.get()); _state |= Done | OK | Sent; + _os.resize(0); // Clear buffer now, instead of waiting for AsyncResult deallocation _remoteObserver.detach(); _monitor.notifyAll(); if(!_callback || !_callback->__hasSentCallback()) @@ -1107,6 +1111,7 @@ IceInternal::CommunicatorBatchOutgoingAsync::check(bool userThread) return; } _state |= Done | OK | Sent; + _os.resize(0); // Clear buffer now, instead of waiting for AsyncResult deallocation _monitor.notifyAll(); } |