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

Ensemble8: memory leak in BrickBreakerApp

XMLWordPrintable

      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

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

              Created:
              Updated:
              Resolved:
              Imported: