Pointers and crashes
Posted: 02 Jun 2014, 22:38
Hello
We got several cases of crash in OpenDungeons, sometimes when putting quarter tiles, when a cannon fires, …
I think most of those come from wrongly handled life cycles.
Also, maybe we should think about replacing bare pointers with the appropriate smart pointers from c++11. ( https://en.wikipedia.org/wiki/Smart_poi ... t_pointers )
We can also use const refs as args of some functions.
We got several cases of crash in OpenDungeons, sometimes when putting quarter tiles, when a cannon fires, …
I think most of those come from wrongly handled life cycles.
Also, maybe we should think about replacing bare pointers with the appropriate smart pointers from c++11. ( https://en.wikipedia.org/wiki/Smart_poi ... t_pointers )
We can also use const refs as args of some functions.