add destroy to pvaClientChannel; in pvaClientGet channel is weak_pointer

This commit is contained in:
mrkraimer
2016-05-17 14:26:41 -04:00
parent cd9bdec84e
commit 40fb22ebd9
4 changed files with 61 additions and 18 deletions

View File

@@ -38,7 +38,13 @@ public:
PvaClientChannelCache(){}
~PvaClientChannelCache(){
if(PvaClient::getDebug()) cout << "PvaClientChannelCache::~PvaClientChannelCache\n";
pvaClientChannelMap.clear();
map<string,PvaClientChannelPtr>::iterator iter;
for(iter = pvaClientChannelMap.begin(); iter != pvaClientChannelMap.end(); ++iter)
{
PvaClientChannelPtr pvaChannel = iter->second;
pvaChannel->destroy();
}
// pvaClientChannelMap.clear();
}
PvaClientChannelPtr getChannel(
string const & channelName,