Title
No way to free storage for vector and deque
Status
nad editorial
Section
[vector] [array]
Submitter
AFNOR

Created on 1998-10-07.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

This is not a defect in the Standard. The LWG has considered this issue in the past and sees no need to change the Standard. Deque has no reserve() member function. For vector, shrink-to-fit can be expressed in a single line of code (where v is vector<T>):

vector<T>(v).swap(v);  // shrink-to-fit v

Date: 2010-02-13.00:00:00

[ 2010-02-13 Alisdair adds: ]

This issue has been revisited and addressed (755, 850). This issues should be reclassified to NAD Editorial to reflect this action.

Date: 1998-10-07.00:00:00

Reserve can not free storage, unlike string::reserve

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg304
2010-10-21 18:28:33adminsetmessages: + msg303
1998-10-07 00:00:00admincreate