Quote:
|
The problem is that the C++ containers seem to reallocate memory when stuff is added to them or when they are copied.
|
You can defer this action, reduce the number of incidences, whatever, by simply setting a larger than (immediately) necessary size on the first usage. If the owner of your company doesn't understand enough about the existing STL to use it advantageously, I doubt the owner of your company understands enough about the issues to rewrite it. What do you think?
Quote:
|
Our client does not like this memory reallocation, he thinks it's possibly dangerous and would like us to do something about it.
|
Clients may rule the day, but the aren't always right. When they aren't it's someone's job to educate them with a rational approach. Does your client really know what he's talking about? Does the owner of your company? Someone needs to. Otherwise, it's the blind leading the blind, and you both fall and bitch (or however that old saying goes).