-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional finalizers in kotlin #687
Optional finalizers in kotlin #687
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG once tests work
{%- else %} | ||
@Override | ||
@SuppressWarnings("Finalize") | ||
fun finalize() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait kotlin used to let you just tack on a finalize method? i did not expect it to be that old school.
no wonder it's deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i think the warning is because it's deprecated now -- you can do the same thing in Java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm familiar with the Java thing I had just almost completely memoryholed it because it's like, something I remember from when I first encountered Java as a kid.
So it was a bit of a throwback seeing this :)
cc @jcrist1 |
Adding an option (specifiable via the Kotlin configuration file) to allow users to specify that they want to generate
finalizer
methods to clean up pointers to opaque data, instead of using Cleaners.This is useful to support older version of the JVM API.