LanternPowered/Lmbda

LambdaType should not override finalize()

A248 opened this issue · 1 comments

A248 commented

Despite the intention of overriding this method to make it final, this causes LambdaType objects to be placed in the finalization queue.

https://www.oracle.com/technical-resources/articles/javase/finalization.html

Instead of trying to prevent people from overriding finalize(), let them implement it and cause their own memory leaks. It should be no matter for everyone else.

The problem right now is that the method is non-trivial, making the body empty will make it considered trivial so it will be ignored by the finalizer.

Should be fixed with b650edb