Hello, in my game I have this memory model by which I compose a grid and store the data structure Tile dynamically with shared_ptr in a 2d vector.
There are times that in my game there are certain routines that have to be done and if that routine fails. My game exits. I use exit() function to do this.
How can I guarantee that all resources are freed and released?
I haven't tried to read the C++11 manual for this, and even if I do, I might not understand it very well.
Which one should I use best for my situation?
Thanks