Does the following code mean that when this function returns, the request object inside this class still holds 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:
request = requests->GetRequest(); //Ref count is two on request object when it returns??
even after having completed above assignment, we still have a ref count of two on request
...
where requests is just a RequestList pointer (raw pointer)...