RFR: 8262518: SwingNode.setContent does not close previous content, resulting in memory leak [v5]

Andy Goryachev angorya at openjdk.org
Mon Aug 28 22:37:19 UTC 2023


On Fri, 25 Aug 2023 03:36:53 GMT, Prasanta Sadhukhan <psadhukhan at 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:
> 
>   javadoc, dispose

Marked as reviewed by angorya (Reviewer).

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

PR Review: https://git.openjdk.org/jfx/pull/1219#pullrequestreview-1599220468


More information about the openjfx-dev mailing list