728x90
the Purpose
STL container has a standard interface that can be applied to every container.
- It is a little weird. Extremely object-oriented.
std::vector<int> scores;
scores.push_back(10); // seems like a stack
std::list<int> ages;
ages.push_back(100); // seems like a stack
std algorithms work in many containers.
It is based on template programming.
It allows the memory to be menaged automatically.
- Frequent memory reallocation can result in memory fragmentation. This can be a huge problem, especially when running programs on platforms that do not support virtual memory.
- Debugging and fixing is also not easy.
Self-Made Alternatives of the Companies
EA
- EASTL
- STL compatible containers for fixing memory issues
Epic Games (UE4)
- TArray, TMap, TMultiMap, TSet
- containers that have better interface than STL
728x90
'College Study > C++ (ENG)' 카테고리의 다른 글
[C++] C++ 11/14/17/... New Keywords (ENG) (0) | 2022.01.02 |
---|---|
[C++] Template Programming (ENG) (0) | 2022.01.02 |
[C++] Standard Template Library Container: Others (ENG) (0) | 2022.01.02 |
[C++] Standard Template Library Container: Map (ENG) (0) | 2022.01.02 |
[C++] Standard Template Library Container: Vector (ENG) (0) | 2022.01.02 |
댓글