DIT168-V2V-responsibles / v2v-protocol

GNU General Public License v3.0
7 stars 3 forks source link

Made use of shared pointers for OD4 sessions #8

Closed maansthoernvik closed 6 years ago

maansthoernvik commented 6 years ago

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?

maansthoernvik commented 6 years ago

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.