While migration to Kotlin from Java I faced with a problem. I overrided Object's finalize() method:
@Override
protected void finalize() throws Throwable {
stopTimer();
super.finalize();
}
When I tried to do the same with Kotlin I found to solutions. The first one is from the doc:
protected fun finalize() {
stopTimer()
super.finalize()
}
And the second one from the article (it's in Russian):
@Suppress("ProtectedInFinal", "Unused")
protected fun finalize() {
stopTimer()
super.finalize()
}
But in both cases I can't call super.finalize() according to IDE, as it says unresolved reference:finalize
Maybe anybody knows how to get this work in Kotlin? Thanks.