Hi Sergey,

AFAIK, lambdas are syntactic sugar for anonymous inner classes, so I think 
using a lambda may not help.
Anyways, Prasanta should be confirming this for us.

Thanks,
Krishna

-----Original Message-----
From: Sergey Bylokhov 
Sent: Monday, August 6, 2018 11:54 PM
To: Prasanta Sadhukhan <prasanta.sadhuk...@oracle.com>; 
swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [12] RFR JDK-8204963:javax.swing.border.TitledBorder 
has a memory leak

Hi, Prasanta.

On 06/08/2018 07:40, Prasanta Sadhukhan wrote:
> Proposed fix is to make it a named static class so that it does not 
> hold reference and can be garbage collected.

The same effect can be achieved by using lambda instead of anonymous 
PropertyChangeListener. Can you please check which version will be 
shorter/clearer lambda or static class.


--
Best regards, Sergey.

Reply via email to