|
|
|
|
|
by rbehrends
808 days ago
|
|
1. Such data structures (or more generally, std::vector<std::string, std::vector<std::string>> or something like that) are the natural way to represent e.g. dictionaries. So, you absolutely often need to do that and "don't do that" doesn't help here. 2. This general issue extends to virtually all collections. The idea that you should avoid large collections is not a practical solution to real world problems. 3. An alternative solution would be lazy destruction, but that comes with its own issues, such as a really bad worst-case memory overhead or making RC sufficiently more complex that it's not really a win over tracing GC anymore [1]. [1] https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d... |
|