summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2008-12-31 14:34:37 -0500
committerBernard Normier <bernard@zeroc.com>2008-12-31 14:34:37 -0500
commita0dfb6ad783f35c1b0cad78b9cdae077b57d6de3 (patch)
tree31fd8eb1d67cce0091b3f1757da55b2114af9363 /cpp/src
parentMerge branch 'R3_3_branch' of ssh://git/home/git/ice into R3_3_branch (diff)
downloadice-a0dfb6ad783f35c1b0cad78b9cdae077b57d6de3.tar.bz2
ice-a0dfb6ad783f35c1b0cad78b9cdae077b57d6de3.tar.xz
ice-a0dfb6ad783f35c1b0cad78b9cdae077b57d6de3.zip
Fixed bug #3232 (Freeze transactional evictor leaks)
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/TransactionI.cpp5
-rw-r--r--cpp/src/Freeze/TransactionalEvictorI.cpp13
2 files changed, 16 insertions, 2 deletions
diff --git a/cpp/src/Freeze/TransactionI.cpp b/cpp/src/Freeze/TransactionI.cpp
index ac595af5120..4f1a04253de 100644
--- a/cpp/src/Freeze/TransactionI.cpp
+++ b/cpp/src/Freeze/TransactionI.cpp
@@ -270,7 +270,10 @@ Freeze::TransactionI::postCompletion(bool committed, bool deadlock)
if(_postCompletionCallback != 0)
{
- _postCompletionCallback->postCompletion(committed, deadlock);
+ PostCompletionCallbackPtr cb = _postCompletionCallback;
+ _postCompletionCallback = 0;
+
+ cb->postCompletion(committed, deadlock);
}
ConnectionIPtr connection = _connection;
diff --git a/cpp/src/Freeze/TransactionalEvictorI.cpp b/cpp/src/Freeze/TransactionalEvictorI.cpp
index e2798be89da..ab3d61444f8 100644
--- a/cpp/src/Freeze/TransactionalEvictorI.cpp
+++ b/cpp/src/Freeze/TransactionalEvictorI.cpp
@@ -625,7 +625,7 @@ Freeze::TransactionalEvictorI::dispatch(Request& request)
}
//
- // Can be reached
+ // Can't be reached
//
assert(0);
throw OperationNotExistException(__FILE__, __LINE__);
@@ -637,6 +637,17 @@ Freeze::TransactionalEvictorI::deactivate(const string&)
{
if(_deactivateController.deactivate())
{
+ {
+ Lock sync(*this);
+
+ //
+ // Set the evictor size to zero, meaning that we will evict
+ // everything possible.
+ //
+ _evictorSize = 0;
+ evict();
+ }
+
//
// Break cycle
//