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

Ensemble8: memory leak in BrickBreakerApp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: javafx

      Description

      BrickBreakerApp has start() method but doesn't implement stop() method.
      Clicking on BrickBreaker as part of Ensemble8 as result can lead to memory leak.
      Another issues is that every time we create new BrickBreaker instance we call
      Config.initialize() which creates new Images and add them into arrays images, bricksImages and bonusesInages.
      This also lead to OutOfMemory exception quite quickly.
      To fix the second issue we either need to create all images once or call images.clear(), bricksImages.clear(),
      bonusesInages.clear() before creating new Images.

      To reproduce the issue run the attached Ensemble8AutoTest with -Xmx64m for example.

      > javac -cp "JFX_HOME/rt/lib/ext/jfxrt.jar;JFX_HOME/apps/ga-samples/Ensemble8.jar" -d . Ensemble8AutoTest.java

      > java -Xmx64m -verbose:gc -cp "JFX_HOME/rt/lib/ext/jfxrt.jar;JFX_HOME/apps/ga-samples/Ensemble8.jar;./" ensemble.autotest.Ensemble8AutoTest

        Attachments

          Activity

            People

            Assignee:
            ekleyman Elina Kleyman (Inactive)
            Reporter:
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: