| 85 | // Reduce memory usage on behalf of object if its capacity is greater |
| 86 | // than or equal to "limit", which defaults to 2^20. |
| 87 | template <class T> inline void STLClearIfBig(T* obj, size_t limit = 1<<20) { |
| 88 | if (obj->capacity() >= limit) { |
| 89 | STLClearObject(obj); |
| 90 | } else { |
| 91 | obj->clear(); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // Specialization for deque, which doesn't implement capacity(). |
| 96 | template <class T, class A> |
nothing calls this directly
no test coverage detected