Hi,
I have a shared pointer like this
class a
{
};
boost::shared_ptr<a> Ptr(new
a());
I need to pass this pointer as an argument to
function (MyFunc) which access this as a reference
void MyFunc(a& ref)
{
}
Now I am calling the function like
this
MyFunc(*Ptr);
But this causes the "Ptr" to destroy early (I am
using this for an asynchronous-ASIO- operation)
How can I do this right?
Thanks a lot,
Lloyd
______________________________________
Scanned and protected by Email scanner