RFR: 8279214: Memory leak in Scene after dragging a cell
Marius Hanl
mhanl at openjdk.org
Wed Sep 14 20:41:54 UTC 2022
On Wed, 14 Sep 2022 20:29:55 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> This PR fixes a memory leak in dnd code in the `MouseHandler` of a `Scene`.
>> The memory leak occurs after calling `startFullDrag()`. The `fullPDRTmpTargetWrapper` is then populated but never cleared.
>> Fix is to call `clear()` on the `fullPDRTmpTargetWrapper`, very similar to https://github.com/openjdk/jfx/pull/448 ([JDK-8264330](https://bugs.openjdk.java.net/browse/JDK-8264330)).
>
> modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 3671:
>
>> 3669: pdrEventTarget.clear();
>> 3670: pdrEventTargets.clear();
>> 3671: fullPDRTmpTargetWrapper.clear();
>
> the change looks ok to me.
> is this the only place where the clear() is needed?
Yes, I checked the path of a typical mouse event and this method is always called when a mouse/drag operation is done.
-------------
PR: https://git.openjdk.org/jfx/pull/899
More information about the openjfx-dev
mailing list