summaryrefslogtreecommitdiff
path: root/rb/src/IceRuby/Communicator.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2007-01-10 20:39:51 +0000
committerMatthew Newhook <matthew@zeroc.com>2007-01-10 20:39:51 +0000
commit66f8deb894fe90fa47e7e30dea1ecc558e0a928e (patch)
tree4c8018c9e3269b21f8e7b2e5f1fbdfd279540f1e /rb/src/IceRuby/Communicator.cpp
parentAdded sun ifdef (diff)
downloadice-66f8deb894fe90fa47e7e30dea1ecc558e0a928e.tar.bz2
ice-66f8deb894fe90fa47e7e30dea1ecc558e0a928e.tar.xz
ice-66f8deb894fe90fa47e7e30dea1ecc558e0a928e.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1391. Fixed GC bug with
communicator.
Diffstat (limited to 'rb/src/IceRuby/Communicator.cpp')
-rw-r--r--rb/src/IceRuby/Communicator.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/rb/src/IceRuby/Communicator.cpp b/rb/src/IceRuby/Communicator.cpp
index 9902f7a7b1a..21461c023a3 100644
--- a/rb/src/IceRuby/Communicator.cpp
+++ b/rb/src/IceRuby/Communicator.cpp
@@ -34,9 +34,16 @@ void
IceRuby_Communicator_mark(Ice::CommunicatorPtr* p)
{
assert(p);
- ObjectFactoryPtr pof = ObjectFactoryPtr::dynamicCast((*p)->findObjectFactory(""));
- assert(pof);
- pof->mark();
+ try
+ {
+ ObjectFactoryPtr pof = ObjectFactoryPtr::dynamicCast((*p)->findObjectFactory(""));
+ assert(pof);
+ pof->mark();
+ }
+ catch(const Ice::CommunicatorDestroyedException&)
+ {
+ // Ignore. This is expected.
+ }
}
extern "C"