I know std::vector doesn't reduce its capacity but since std::deque is allocated in chunks, I expect it to free at least some of the chunks that are no longer used.
From what I have searched I am confused as the answer seems to be "no" or "maybe". Does anyone have a concrete answer?
If it does not free its chunks, does anyone know of some other implementation that does this?
I am brainstorming data structures for an application redesign that currently uses linked lists but gives poor performance which is why I am considering a deque. Challenge is my application should run the whole day and it would have tons of deque and each one could grow to be very long, hence I cannot neglect storage use of deque or a vector.