I don't know how it is for templates, but I would find it silly that each template instance would get its own map, especially when the map does not hold any type of T, which it does not.
However, in my current code, there's only one map because it's declared as a global variable inside the DLL (inside the MemoryManager namespace) which is returned by the GetStatics() function.
Does it matter? No? Unless I see memory running out, I'm not really phased by the overhead.
Aside from keeping the memory safe, it's also thread safe and helps (at least will) in keeping your data on the heap thread safe, as well.
And even so, with so much memory we have nowadays, I'm a little spoiled, and I have all the right to be!![]()



LinkBack URL
About LinkBacks




CornedBee