On Thu, 12 Jan 2023 12:08:51 GMT, Daniel Jeliński wrote:
> Please review this fix for DwarfParser cleaner.
>
> The original code registered the cleaner using a lambda that captured a
> reference to the parser object; as a result, the object was never GCed, and
> the cleaner never ran.
>
> In
On Fri, 13 Jan 2023 07:45:59 GMT, Daniel Jeliński wrote:
> As far as I could tell, the cleaners you pointed out use local variables
> only. As long as the lambda does not reference any object fields or instance
> methods, `this` is not captured.
Ok. So the lambda needs to reference a field of
On Thu, 12 Jan 2023 21:26:09 GMT, Chris Plummer wrote:
> This seems like a pretty serious flaw with using Lambdas and Cleaners that
> probably should be brought up with the libs and language teams.
They are aware of this issue; it's even mentioned in [this
article](https://inside.java/2022/05/
On Thu, 12 Jan 2023 12:08:51 GMT, Daniel Jeliński wrote:
> Please review this fix for DwarfParser cleaner.
>
> The original code registered the cleaner using a lambda that captured a
> reference to the parser object; as a result, the object was never GCed, and
> the cleaner never ran.
>
> In
On Thu, 12 Jan 2023 12:08:51 GMT, Daniel Jeliński wrote:
> Please review this fix for DwarfParser cleaner.
>
> The original code registered the cleaner using a lambda that captured a
> reference to the parser object; as a result, the object was never GCed, and
> the cleaner never ran.
>
> In
On Thu, 12 Jan 2023 12:08:51 GMT, Daniel Jeliński wrote:
> Please review this fix for DwarfParser cleaner.
>
> The original code registered the cleaner using a lambda that captured a
> reference to the parser object; as a result, the object was never GCed, and
> the cleaner never ran.
>
> In
Please review this fix for DwarfParser cleaner.
The original code registered the cleaner using a lambda that captured a
reference to the parser object; as a result, the object was never GCed, and the
cleaner never ran.
In this version I moved the lambda creation to a static method, so that it