summaryrefslogtreecommitdiff
path: root/cpp/src/Glacier2Lib/SessionHelper.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-12-23 15:41:08 +0100
committerJose <jose@zeroc.com>2014-12-23 15:41:08 +0100
commit02b82b5518283f8a99eafb893771ff24651aaaa8 (patch)
tree184091d35519671d6f6ccf426d2151436d1584eb /cpp/src/Glacier2Lib/SessionHelper.cpp
parentBetter fix for (ICE-6211) (diff)
downloadice-02b82b5518283f8a99eafb893771ff24651aaaa8.tar.bz2
ice-02b82b5518283f8a99eafb893771ff24651aaaa8.tar.xz
ice-02b82b5518283f8a99eafb893771ff24651aaaa8.zip
Don't clean references in SessionHelper threads isn't required and is confusing
Diffstat (limited to 'cpp/src/Glacier2Lib/SessionHelper.cpp')
-rw-r--r--cpp/src/Glacier2Lib/SessionHelper.cpp39
1 files changed, 10 insertions, 29 deletions
diff --git a/cpp/src/Glacier2Lib/SessionHelper.cpp b/cpp/src/Glacier2Lib/SessionHelper.cpp
index 77dd35b93d0..c54d38f558e 100644
--- a/cpp/src/Glacier2Lib/SessionHelper.cpp
+++ b/cpp/src/Glacier2Lib/SessionHelper.cpp
@@ -156,17 +156,12 @@ public:
virtual void run()
{
_session->destroyInternal(_disconnected);
- //
- // We don't need to hold this references any longer
- //
- _session = 0;
- _disconnected = 0;
}
private:
- SessionHelperIPtr _session;
- Ice::DispatcherCallPtr _disconnected;
+ const SessionHelperIPtr _session;
+ const Ice::DispatcherCallPtr _disconnected;
};
}
@@ -559,23 +554,15 @@ public:
_session->dispatchCallback(new ConnectFailed(_callback, _session, ex), 0);
}
-
- //
- // We don't need to hold this references any longer
- //
- _callback = 0;
- _session = 0;
- _factory = 0;
- _communicator = 0;
}
private:
- Glacier2::SessionCallbackPtr _callback;
- SessionHelperIPtr _session;
- ConnectStrategyPtr _factory;
- Ice::CommunicatorPtr _communicator;
- string _finder;
+ const Glacier2::SessionCallbackPtr _callback;
+ const SessionHelperIPtr _session;
+ const ConnectStrategyPtr _factory;
+ const Ice::CommunicatorPtr _communicator;
+ const string _finder;
};
@@ -595,19 +582,13 @@ public:
virtual void run()
{
_session->dispatchCallback(_call, _conn);
- //
- // We don't need to hold this references any longer
- //
- _session = 0;
- _call = 0;
- _conn = 0;
}
private:
- SessionHelperIPtr _session;
- Ice::DispatcherCallPtr _call;
- Ice::ConnectionPtr _conn;
+ const SessionHelperIPtr _session;
+ const Ice::DispatcherCallPtr _call;
+ const Ice::ConnectionPtr _conn;
};
}