On Mon, 16 May 2022 05:33:24 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> > > Does it mean that setVisible(true) cause some memory leak since it 
> > > prevents the window to be disposed?
> > 
> > 
> > Since 9 windows are freed .. I doubt it .. but what's the hold up with #10 
> > ? I wonder if you need an extra System.gc() cycle
> 
> Then why we delete the "setVisible(true)"? probably we leak the latest 
> visible window?

I dont think this is related to TitledBorder fix done in JDK-8204963.
Even if we remove TitledBorder code from the test and only keep JFrame, then 
also I see

`java.lang.RuntimeException: Expected Total to be freed : 10 Freed 9 `

so I think it's a generic JFrame dispose issue with CleanerFactory in linux 
(last JFrame is not cleaned up by CleanerFactory) which can be worked upon in a 
separate PR.

As I see, TitledBorder leak is fixed and there's no point having the test 
problemlisted for linux due to JFrame issue.

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

PR: https://git.openjdk.java.net/jdk/pull/8450

Reply via email to