diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-05-28 04:28:41 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-05-28 04:28:41 +0000 |
commit | ac88e6ceea41685c5a2e1611b6d56d309f039f3e (patch) | |
tree | 5cb594a9c1f0d6d319862018826d724d5c4fa4ab /cpp/src | |
parent | Fixed typo (diff) | |
download | ice-ac88e6ceea41685c5a2e1611b6d56d309f039f3e.tar.bz2 ice-ac88e6ceea41685c5a2e1611b6d56d309f039f3e.tar.xz ice-ac88e6ceea41685c5a2e1611b6d56d309f039f3e.zip |
fixing memory leak
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceStorm/Flusher.cpp | 9 | ||||
-rw-r--r-- | cpp/src/IceStorm/TopicManagerI.cpp | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cpp/src/IceStorm/Flusher.cpp b/cpp/src/IceStorm/Flusher.cpp index 8dae4d5cce8..4ef6b3374d1 100644 --- a/cpp/src/IceStorm/Flusher.cpp +++ b/cpp/src/IceStorm/Flusher.cpp @@ -70,6 +70,11 @@ public: } flushAll(); } + + // + // We break a cycle by clearing the subscriber list. + // + _subscribers.clear(); } void @@ -162,8 +167,6 @@ Flusher::Flusher(const Ice::CommunicatorPtr& communicator, const TraceLevelsPtr& Flusher::~Flusher() { - _thread->destroy(); - _thread->getThreadControl().join(); } void @@ -182,5 +185,5 @@ void Flusher::stopFlushing() { _thread->destroy(); + _thread->getThreadControl().join(); } - diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index 1076b904244..3ce6d859b26 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -68,6 +68,7 @@ TopicManagerI::TopicManagerI(const Ice::CommunicatorPtr& communicator, const Ice TopicManagerI::~TopicManagerI() { + _flusher->stopFlushing(); } TopicPrx |