[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] JPEGImageWriter memory leak, regression due to fix for 800791
From: Mario Torre <neugens () redhat ! com>
Date: 2013-07-22 18:42:19
Message-ID: 1374518539.6387.59.camel () galactica ! localdomain
[Download RAW message or body]
On Mon, 2013-07-22 at 16:30 +0400, Andrew Brygin wrote:
> Hello Mario,
Hi Andrew,
Thanks for the reply :)
> This problem is now tracked as a bug 8020983:
> http://bugs.sun.com/view_bug.do?bug_id=8020983
>
> This problem can be avoided by an explicit call for reset() or
> dispose() on an instance of jpeg writer.
Right, but I don't know if this is possible always. It's indeed a valid
workaround if you have some control over the code of course.
I think the original proposed patch is actually a good fix for 6, 7 and
8, because although the Writer is correctly registered to the 2d
disposer, it will never be triggered because of the global strong
reference. It should be safe to use a weak reference here because it's
actually a reference to "this", so it won't be disposed while being
used. Everything else will be cleaned by the Disposer so it should not
matter.
But I'm not a reviewer so I need somebody to approve it first...
Cheers,
Mario
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic