Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4619094

(coll) add API to request that a collection shrink to reduce unused space

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:

      Description

      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.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pbk Peter Kessler (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: