On Thu, 1 Dec 2022 22:45:20 GMT, John Hendrikx wrote:
>> just to be sure, which weak listener are you referring to?
>
> I didn't mean a weak listener, but a weak reference. This line creates one:
>
> sceneListenerHelper = new ListenerHelper(MenuBarSkin.this);
>
> I think a plain `new
On Thu, 1 Dec 2022 19:47:52 GMT, Andy Goryachev wrote:
>>> but instead the whole component or Pane might be removed from the scene and
>>> discarded.
>>
>> If that happens, weak reference won't make a difference there either.
>> Removing an entire branch from the Scene and not referring to it
On Thu, 1 Dec 2022 17:53:32 GMT, John Hendrikx wrote:
>> my version does not create extra object(s).
>
> Hm, I thought that the number of objects created is the same, either a
> `ChangeListener` is created and then wrapped in `ChLi` or a `Consumer` is
> created and wrapped in `ChLi`.
yes, you
On Thu, 1 Dec 2022 17:48:59 GMT, John Hendrikx wrote:
>> You are right: some weak listeners remain, I did not want to re-write the
>> whole thing for a fear of introducing regression and to keep the changes to
>> a minimum.
>>
>> The second `ListenerHelper` (line 293) gets disconnected in
On Wed, 30 Nov 2022 23:28:02 GMT, Andy Goryachev wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
>> line 374:
>>
>>> 372:
>>> 373: // When the parent window looses focus - menu
>>> selection should be cleared
>>> 374:
On Wed, 30 Nov 2022 23:25:16 GMT, Andy Goryachev wrote:
> but instead the whole component or Pane might be removed from the scene and
> discarded.
If that happens, weak reference won't make a difference there either. Removing
an entire branch from the Scene and not referring to it anymore
On Wed, 30 Nov 2022 23:13:42 GMT, Andy Goryachev wrote:
>> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/SkinMemoryLeakTest.java
>> line 227:
>>
>>> 225: ComboBox.class,
>>> 226: DatePicker.class,
>>> 227: //MenuBar.class,
On Wed, 30 Nov 2022 21:24:02 GMT, John Hendrikx wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8294589: cleanup
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
> line 374:
On Wed, 30 Nov 2022 21:08:15 GMT, John Hendrikx wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8294589: cleanup
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
> line 293:
On Wed, 30 Nov 2022 20:47:33 GMT, John Hendrikx wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8294589: cleanup
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
> line 436:
On Wed, 30 Nov 2022 19:08:31 GMT, John Hendrikx wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8294589: cleanup
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
> line 286:
On Wed, 30 Nov 2022 18:43:42 GMT, Andy Goryachev wrote:
>> Fixed memory leak by using weak listeners and making sure to undo everything
>> that has been done to MenuBar/Skin in dispose().
>>
>> This PR depends on a new internal class ListenerHelper, a replacement for
>>
> Fixed memory leak by using weak listeners and making sure to undo everything
> that has been done to MenuBar/Skin in dispose().
>
> This PR depends on a new internal class ListenerHelper, a replacement for
> LambdaMultiplePropertyChangeListenerHandler.
> See
13 matches
Mail list logo