I'm sorry if I seem a bit harsh, but it is in the code. If somthing makes it hard to read, please tell me... ...Mabey you're refering to the map in the snapshot_class ?? If so, that is so that the memory for that map is used as efficienty as possible. As you can see, it is a smart pointer. |
A map is a map. It is never a smart pointer. You may have a smart pointer that points to a map (and please note that a smart
pointer is a
pointer,) but a smart pointer is not a map, and a map is not a smart pointer.
I have also observed that smart pointers clear their memory faster than when using map<class, class>().clear() . |
You have observed nothing of the sort. The methods of map have nothing to do with a smart pointer.
You complain because it is apparent to you that people aren't spending enough time studying your code while it is apparent to those people that you haven't spent enough time studying the language constructs you are attempting to use, but it's hard to point that out to you since you deny using them. Sorry to be harsh, but it's true.
When presenting code that you need debugged or analyzed because you aren't up to the task, please reduce it to a minimal, compilable snippet of code that reproduces the problem. Often in doing so, you'll hit on the answer yourself - in fact it's a rather productive debugging practice when it's possible to do so. Anybody's time who might help you on here is just as important as yours. If you can't bother with a response that isn't "read the code" to someone who obviously has, you're going to find yourself getting responses like "RTFM," which you should do, by the way.