Fixed bug #2966885: memory leak caused by strong ref (thanks to tuxx from SF).

This commit is contained in:
Vincent Richard 2010-03-10 13:29:33 +00:00
parent f69f48437f
commit 75fcad48c9
2 changed files with 3 additions and 5 deletions

View File

@ -96,7 +96,7 @@ const string defaultSASLAuthenticator::getAnonymousToken() const
const string defaultSASLAuthenticator::getServiceName() const
{
return m_saslSession->getServiceName();
return m_saslSession.acquire()->getServiceName();
}
@ -121,7 +121,7 @@ void defaultSASLAuthenticator::setSASLSession(ref <SASLSession> sess)
ref <SASLSession> defaultSASLAuthenticator::getSASLSession() const
{
return m_saslSession;
return m_saslSession.acquire();
}

View File

@ -67,10 +67,8 @@ private:
defaultAuthenticator m_default;
weak_ref <net::service> m_service;
ref <SASLSession> m_saslSession;
weak_ref <SASLSession> m_saslSession;
ref <SASLMechanism> m_saslMech;
};