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

addeventHandler or setOnAction leads to memory leak since eventhandler is never removed from eventhandlermap

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Incomplete
    • Affects Version/s: 7u21
    • Fix Version/s: None
    • Component/s: javafx
    • Subcomponent:

      Description

      I am in a bit of hurry so pardon me for not providing a SSCCE. (and I am working on very large legacy system as of now)

      But I am pretty sure, I am seeing one specific behaviour with
      addEventHandler()
      and
      removeEventHandler()

      set of methods.

      Basically what I have understood so far from profiling that EventHandlerManager implementation is not removing the CompositeHandler from eventHandlerMap its keeping. Unregistring is fine, probably that is working I didn't check though, but not removing from map and and hence getting leaking my handler (and this become more sever problem when my handler is an inner class, which actually is in my case and outer class also is kept alive then)

      Can somebody please take a look and confirm if my suspicion is correct?

        Attachments

          Activity

            People

            • Assignee:
              msladecek Martin Sládeček
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: