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

Unnecessary object retention in java.util.zip.Deflater

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.1_16
    • 1.3.1, 1.4.2, 5.0, 6
    • core-libs
    • None
    • b01
    • generic
    • generic

        It's not uncommon for applications that compress large quantities of data to
        pass a very large byte array to the Deflater.setInput method, either directly
        or via the DeflaterOutputStream.write method. The Deflater code saves a
        reference to the given byte array in a private field, and this private field is
        never cleared. Since the Deflater class has a finalization method it can take
        quite a while for a Deflater instance to be garbage collected, and in the
        meantime the potentially-large byte array will be kept alive for no reason.
        This has been observed to cause OutOfMemoryErrors under heavy load.

        This bug is present in 1.3.1, 1.4.x, 5.0, and Mustang.

        ###@###.### 2005-1-28 20:22:46 GMT

              hgodugusunw Harsha Godugu (Inactive)
              mr Mark Reinhold
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: