As per our feedback I have added shared pointers instead of raw ones. One thing still perplexes me a bit though. Not adding the broadcast session for the sender class as a class variable did not work as before with new. I would not receive messages on the broadcast channel (annouce presence that is) until adding the class variable to hold a reference to the session. Anyone have any input on this?
Julian pointed out a good point, since shared pointers will will delete their references once the count reaches zero the end of the constructor was probably interpreted as "end of use" for the OD4Session.
As per our feedback I have added shared pointers instead of raw ones. One thing still perplexes me a bit though. Not adding the broadcast session for the sender class as a class variable did not work as before with new. I would not receive messages on the broadcast channel (annouce presence that is) until adding the class variable to hold a reference to the session. Anyone have any input on this?