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

JavaBeanProperty: memory leak?

    Details

    • Subcomponent:

      Description

      tested against jdk8-fsc-b129 (don't know which version that is in the combo above ;-)

      Looks like a JavaBeanProperty is never garbage collected. The snippet below (full working example and further details at SO http://stackoverflow.com/a/21579555/203657 ) creates a bunch of adapters just for local fun, they build up in memory and there's no way - at least I couldn't fine any - to get rid of them again.

          @Override
          public void handle(ActionEvent paramT) {
              Property propertyFX;
              for (int i = 0; i < 100000; i++) {
                  propertyFX = createCountProperty();
              }
              LOG.info("created 100k adapters");
          }

          protected JavaBeanDoubleProperty createJavaBeanProperty(){
              try {
                  return JavaBeanDoublePropertyBuilder.create()
                          .bean(counter).name("count").build();
              } catch (NoSuchMethodException e) {
                  e.printStackTrace();
              }
              return null;
          }

      This behaviour was introduced sometime during jdk8.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msladecek Martin Sládeček
                Reporter:
                fastegal Jeanette Winzenburg
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: