cleanup from dtor

Avoid unnecessary reset() of otherwise const shared_ptr in destroy()
as this necessities locking for potentially concurrent access.
This commit is contained in:
Michael Davidsaver
2015-12-08 16:10:17 -05:00
parent b0f855337f
commit 3865745790
2 changed files with 0 additions and 15 deletions

View File

@ -39,20 +39,6 @@ GWChannel::message(std::string const & message, pvd::MessageType messageType)
void
GWChannel::destroy()
{
std::cout<<__PRETTY_FUNCTION__<<"\n";
// Client closes channel. Release our references,
// won't
shared_pointer self(weakref);
{
Guard G(entry->cache->cacheLock);
// remove ourselves before releasing our reference to prevent "stale" pointers.
// Poke the cache so that this channel is held open for a while longer
// in case this client reconnects shortly.
entry->dropPoke = true;
entry->interested.erase(self);
}
requester.reset();
entry.reset();
}
std::tr1::shared_ptr<pva::ChannelProvider>

View File

@ -176,7 +176,6 @@ MonitorUser::destroy()
Guard G(entry->chan->cache->cacheLock);
running = false;
}
req.reset();
}
pvd::Status