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

Path2D storage trimming

XMLWordPrintable

    • 2d
    • minimal
    • Java API
    • SE

      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();

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

              Created:
              Updated: