Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8078192

Path2D storage trimming

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Draft
    • Priority: P4
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      To be filled in before a CSR is made publicly visible; concise one to two sentence summary of the proposed change.

      Problem

      There are no public method to trim the arrays on an existing path object to just the needed size for long term storage. This would be useful when an object will be kept in a static state for a long time and the added storage that was created for potential growth will never be used.

      Solution

      Add a trim method (and associated overrides) to trim the arrays

      Specification

      /**
          * Trims the capacity of this <tt>Path2D</tt> instance to be the
          * path's current size.  An application can use this operation to minimize
          * the storage of a <tt>Path2D</tt> instance.
          * @since 1.9
          */
         public abstract void trimToSize();

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              prr Philip Race
              Reporter:
              flar Jim Graham
              Reviewed By:
              Philip Race
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: