-
Enhancement
-
Resolution: Unresolved
-
P4
-
2.0
-
Fix Understood
-
generic
-
generic
Collections should be able to resize to reduce their overhead.
Current implementations grow when you add members, but don't
shrink when you remove them.
This is strictly an implementation detail. If we wanted to, we
could add APIs to suggest when to shrink (e.g., load factors below
which to shrink, shrinkToFit() methods, etc.)
Current implementations grow when you add members, but don't
shrink when you remove them.
This is strictly an implementation detail. If we wanted to, we
could add APIs to suggest when to shrink (e.g., load factors below
which to shrink, shrinkToFit() methods, etc.)
- relates to
-
JDK-4343436 (coll) HashMap.clear() is slow for empty maps
- Closed
-
JDK-5098155 (coll) Need "VariableCapacity" interface for ensureCapacity, trimToSize apis
- Closed