summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-11-10 14:34:52 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-11-10 14:34:52 +0000
commitd8480f31455c708d0072a8d1a6a28f4b19bd647e (patch)
tree6d282b3fe4bf9ce7fe08c6da6b728f1f9912d76f /cpp/src/IceGrid/ServerI.cpp
parentFilter out IPv6 addresses in getLocalHosts (diff)
downloadice-d8480f31455c708d0072a8d1a6a28f4b19bd647e.tar.bz2
ice-d8480f31455c708d0072a8d1a6a28f4b19bd647e.tar.xz
ice-d8480f31455c708d0072a8d1a6a28f4b19bd647e.zip
Memory leak fixes
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r--cpp/src/IceGrid/ServerI.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index cbf66ab51de..05c6125ad9a 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -262,21 +262,30 @@ ServerCommand::ServerCommand(const ServerIPtr& server) : _server(server)
{
}
+ServerCommand::~ServerCommand()
+{
+}
+
TimedServerCommand::TimedServerCommand(const ServerIPtr& server, const WaitQueuePtr& waitQueue, int timeout) :
- ServerCommand(server), _waitQueue(waitQueue), _timer(new CommandTimeoutItem(this)), _timeout(timeout)
+ ServerCommand(server), _waitQueue(waitQueue), _timeout(timeout)
{
}
void
TimedServerCommand::startTimer()
{
+ _timer = new CommandTimeoutItem(this);
_waitQueue->add(_timer, IceUtil::Time::seconds(_timeout));
}
void
TimedServerCommand::stopTimer()
{
- _waitQueue->remove(_timer);
+ if(_timer)
+ {
+ _waitQueue->remove(_timer);
+ _timer = 0;
+ }
}
LoadCommand::LoadCommand(const ServerIPtr& server) :
@@ -394,7 +403,7 @@ DestroyCommand::finished()
for(vector<AMD_Node_destroyServerPtr>::const_iterator p = _destroyCB.begin(); p != _destroyCB.end(); ++p)
{
(*p)->ice_response();
- }
+ }
}
PatchCommand::PatchCommand(const ServerIPtr& server) :