Skip to content

WeakListener regression #47

@effad

Description

@effad

net.synedra.validatorfx.GraphicDecoration.layoutListener ist created like this:

		layoutListener = new WeakChangeListener<>((observable, oldValue, newValue) -> layoutGraphic());

this is very likely wrong, since WeakChangeListener explicetly states that "You have to keep a reference to the {@code ChangeListener} that
was passed in for as long as it is in use, otherwise it will be garbage collected too soon."

One way to reproduce the problem is to use the AccordionDemo:

  • Write Strings that are "too long" (e.g. 4 chars) into Pane 0 and Pane 1.
  • Open Pane 2
  • Trigger Garbage Collection (e.g. visualvm)
  • Open and close Pane 0
    The red mark will be displayed on top of the closed Pane 0, assumedly because the weak listener is gone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions