Does the following code indicate that when returning this function, the request object inside this class still contains a reference to this object?
boost::shared_ptr<Request> RequestList::GetRequest()
{
boost::mutex::scoped_lock(listmtx);
request = boost::shared_ptr<Request>(new Request());
return request;
}
used by:
request = requests->GetRequest(); //Ref count is two on request object when it returns??
even after he completed the above assignment, we still have ref ref for two on request...
where the requests are just a RequestList (raw pointer) ...
source
share