On Wed, 23 Aug 2023 13:21:00 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> Issue is when setting the content of a SwingNode, the old content is not 
>> garbage collected owing to the fact
>> JLightweightFrame is never being released by SwingNodeDisposer
>> 
>> The SwingNodeDisposer holds an hard pointer to the JLightweightFrame that 
>> prevents its collection
>> 
>> Modified `SwingNode.setContentImpl`  function to use a WeakReference to 
>> properly release the memory.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   DisposerRecord leak fix

modules/javafx.swing/src/main/java/javafx/embed/swing/SwingNode.java line 77:

> 75: import com.sun.javafx.embed.swing.SwingEvents;
> 76: import com.sun.javafx.embed.swing.newimpl.SwingNodeInteropN;
> 77: import jdk.swing.interop.LightweightFrameWrapper;

LightweightFrameWrapper import can be removed

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1219#discussion_r1303146032

Reply via email to