Hi Petr,
I just realized what is the difference in you case…
You have created this PeersRequestSessionPtr because the factory is not only passing a pointer but it should be passing the ownership of the object too. Maybe you tried out with auto_ptr but got compilation problems?
I we ignore the passing of ownership issue at first, then what I suggested in the previous post would do the job. However, if we want to explicitly pass ownership (which is always a good idea!), then probably we should stick to your current solution. I’ll give it another thought and let you know if think of a good alternative.
Regards,
Peter
